Page 1 of 1

Adding carrier(s)

PostPosted: Mon Feb 22, 2010 6:14 pm
by fadmin
NOTE: This is old information. Carrier configuration is now done through the Admin GUI under Setup->Carriers. First add a new carrier, then select one of the templates to aid in your configuration. After that, select your carrier as the system default under Setup->System Settings, and within each campaign you wish to use.

To add a carrier two files needs to be modified (until we integrate the function).

Do Not Alter Anything Else, unless you really know what you are doing.
If you Do make other changes and call us for help, make sure to have full documentation of your changes to make debugging go faster. Said differently, document all your changes.

(Note: In this example we are using the custom config file as the others will be updated, and overwritten by OSDial in the future.)

Here you need to add the carrier configuration. A typical one may look like this:
Code: Select all
host= (Enter carrier's IP, or domain name, that they give you)
nat=no # could be yes

nat=no when you are directly connected to the internet

allow=ulaw is allowing specifically g.711. To allow g.729 add a line, below 'disallow=all', that says 'allow=g729'.

qualify=3000 means it will not only block any connection with a 3 second delay, but also tell you what the delay is with that carrier when you run 'sip show peers' from the Asterisk Command Line Interface (CLI).

Next, we need to assign a dial prefix to the carrier. The default prefix is 9. Edit /etc/asterisk/osdial_extensions_outbound.conf
and locate the line that reads:
Code: Select all
exten => _dial9.,1,Dial(SIP/binfone/${EXTEN:5},60,o)

'_dial9.' Means that having a 9 as prefix is going to result in this line being used to dial out. _dial8 means the same but for the dial prefix 8. The prefix is set in each campaign. This also have the added benefit of allowing you to change carrier mid-dialing. It will take effect on every new call it makes once you press Submit. Calls in progress will obviously not be affected.
You can add support for several carriers by using other prefixes:
Code: Select all
exten => _dial8.,1,Dial(SIP/carrier2/${EXTEN:5},60,o)
exten => _dial7.,1,Dial(SIP/carrier3/${EXTEN:5},60,o)

'binfone' Is the name of the carrier the defult configuration uses. Change this to match 'nameofcarrier' from osdial_sip_custom.conf above.

${EXTEN:5} means we are stripping off the first 5 characters (dial9) so that it does not try to dial 'dial9' but only the number that follows immediately after. With some carriers you need to only send ten digits, and not a 1 plus the number. If so then the line would look like this:
Code: Select all
exten => _dial9.,1,Dial(SIP/binfone/${EXTEN:6},60,os)

Note how the 5 has become 6. Also, be sure not to add spaces or alter anything by mistake as it is likely to crash the dialer.

Re: Adding carrier(s)

PostPosted: Mon Apr 19, 2010 1:22 pm
by Cameron
where do you add the registration String for the carrier

Re: Adding carrier(s)

PostPosted: Wed Apr 21, 2010 5:37 pm
by chesstrian
Hi, i want add an iax carrier, in the file osdial_iax_custom.conf i added the configuration, the problem is that asterisk can't see the register, where can i add the line register => user:pass@host:port?

Re: Adding carrier(s)

PostPosted: Tue May 25, 2010 8:31 am
by jesse
How do you add dahdi trunks or its not possible to add the trunks?

Re: Adding carrier(s)

PostPosted: Wed May 26, 2010 11:11 pm
by sentm
jesse wrote:How do you add dahdi trunks or its not possible to add the trunks?

If you are using Sangoma based hardware, login as root and run the following on the command-line:
Code: Select all

You will be prompted for the specifics for each port. For the context, select custom and enter osdial. For the group, set 1 on external ports and 0 on internal ports.

If you are using Digium brand or a generic third-party PRI or FXO/FXS card, you will have to refer to their documentation on configuration of the cards...Using context=osdial, group=1 for external ports and group=0 for internal ports.

Modify /etc/asterisk/osdial_extensions_outbound.conf to contain the following for the dial9 extension:
Code: Select all
; 9 prefix -> TRUNK1
exten => _dial9.,1,Dial(DAHDI/g1/${EXTEN:5},60,o)
exten => _dial9.,2,Hangup

Note: If you provider sends inbound calls top-down, set the dial string to use G1 instead of g1.

Re: Adding carrier(s)

PostPosted: Thu Jun 23, 2011 5:33 pm
by danial
how to add carriers which have to dial 00 first the the number (0012127773456)
i have a carrier where we need to add 00 then dial the number
can any one help me on it

Re: Adding carrier(s)

PostPosted: Thu Jun 23, 2011 6:19 pm
by fadmin
You should be aware that this forum does not necessarily operate with "urgent". If you really are in a hurry I suggest you buy an hour of support from Call Center Service Group ( Can be handy later on as well.

Re: Adding carrier(s)

PostPosted: Thu Jun 23, 2011 7:19 pm
by danial
Sorry for that plz help me

Re: Adding carrier(s)

PostPosted: Sat Jun 25, 2011 3:49 pm
by DhwaniTechnologies
How I would do it is add it manually to /etc/asterisk/osdial_extensions_custom.conf

Code: Select all
exten => _00X.,1,Dial(SIP/carriername/${EXTEN:2})
exten => _00X.,2,Hangup

Remove the :2 if you want to send 00 to the provider.

Re: Adding carrier(s)

PostPosted: Tue Dec 03, 2013 1:06 am
by helpdesk
I have installed osdial and updated successfully, after that pls help me!