Dialplan for international calls - can't dial out

Discussion in 'Open Discussion' started by Laurence, Jul 12, 2018 at 1:12 AM.

  1. Laurence

    Laurence New Member

    Joined:
    Jul 6, 2018
    Messages:
    10
    Likes Received:
    0
    I have the following dialplan setup for Incredible PBX calling
    exten => _NXXNXXXXXX,1,Set(CALLERID(dnid)=${CALLERID(dnid)})
    exten => _NXXNXXXXXX,n,Set(CALLERID(dnid)=1${CALLERID(dnid)})
    exten => _NXXNXXXXXX,n,Goto(1${EXTEN},1)
    exten => _1NXXNXXXXXX,1,Set(CHANNEL(accountcode)=Google Voice)
    exten => _1NXXNXXXXXX,n,Dial(PJSIP/1${EXTEN:1}@gvsip,,r)


    I am not sure what this all means but it seems to work calling to US numbers.
    But I call international numbers e.g. 011<country code?><city code><number> which worked fine on the OBI100 and also works fine with the GV Android client (I do have enough credit)

    But when I try with my phone connected to Incredible PBX a nice lady :) says "you call cannot be completed as dialed - please check the number and dial again" Actually where is the message coming from?

    Any guidance really appreciated. Thanks
     
  2. rogerjbos

    rogerjbos Member

    Joined:
    Mar 27, 2015
    Messages:
    44
    Likes Received:
    5
    You need to research asterisk dialplans, chapter 6 of this might help: http://asterisk-service.com/downloads/Asterisk- The Definitive Guide, 4th Edition.pdf

    N is a number between 2 and 9 and X is any number and _ means match, so those five lines match 10 digit and 11 digits numbers. If you put a 011 in front of the number, now you have more digits and that longer number is not caught by any of those 5 lines.

    I am not very experienced with dialplans, they usually take a fair amount of trial and error to get just right. You could try repeating the last two lines and replacing the _1 with _0111, but that would only work for 011 country codes.

    I don't know if this is a good idea or not, but this line should match on anything starting with 0 and send it to google voice:

    exten => _0.,n,Dial(PJSIP/${EXTEN}@gvsip,,r)

    Make sure you have security on you PBX so no one hacks in and makes a bunch of calls at your expense. I use my google voice only for US calling, so if there is no balance on the account they can't really steal from me. Good luck.
     
  3. Laurence

    Laurence New Member

    Joined:
    Jul 6, 2018
    Messages:
    10
    Likes Received:
    0
    Thanks that worked. I don't have a risk issues because 1) I only keep about $2 on the account and 2) there is no autorenew on the account
     
  4. rogerjbos

    rogerjbos Member

    Joined:
    Mar 27, 2015
    Messages:
    44
    Likes Received:
    5
    Glad to hear it worked for you. Good luck with your PBX.
     

Share This Page