Custom prefix per sip carrier

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Custom prefix per sip carrier

Postby lmora » Wed Oct 07, 2009 6:10 pm

Hi guys

I have 2 sip carriers that require the following patterns:

Carrier 1: 01(10 digits)
Carrier 2: 52(10 digits)


My lists were uploaded using the pattern of carrier 1: [01(10 digits)] so in order to use carrier 2 I need some logic in the dial plan to replace the 01 by 52 but honestly I don't know how to do it.

could you help me with the instruction?


I use Dial Prefix with 8 or 9 to choose the carrier
Carrier 1
exten => _952X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _952X.,2,Dial(${SIPTRUNK}/${EXTEN:3},,tTor)
exten => _952X.,3,Hangup

Carrier 2
exten => _852X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _852X.,2,Dial(${SIPTRUNK_iVOICE}/${EXTEN:3},,tTor)
exten => _852X.,3,Hangup


Thanks
lmora
 
Posts: 153
Joined: Wed Jul 01, 2009 7:17 pm
Location: Mexico

Postby codehaxor » Thu Oct 08, 2009 3:47 am

Just use _9. for carrier 1 and _8. for carrier 2
Team Dax Cordova IT Consulting
Vicidial Remote & Onsite Installation / Configuration / Custom Development / Consultancy Services
http://www.linkedin.com/in/codehaxor
FREE VICIDIAL INSTALLATION IN THE PHILIPPINES
codehaxor
 
Posts: 151
Joined: Wed Mar 14, 2007 2:37 am
Location: Dumaguete City, Philippines

Postby lmora » Fri Oct 09, 2009 10:22 am

Thanks for asnwering.

Unfortunately I already have my lists uploaded with a format that I have to process to comply with the pattern required by my new sip carrier.

I solved the problem reading further about getting substrings and concatenation in dialplans.

The solution is to take the last 10 digits of my string and then concatenate 52 at the beginning of the string to dial.

Dial(${SIPTRUNK}/52${EXTEN:-10},,tTor)


Thanks
lmora
 
Posts: 153
Joined: Wed Jul 01, 2009 7:17 pm
Location: Mexico


Return to Support

Who is online

Users browsing this forum: Majestic-12 [Bot] and 94 guests