Selection of trunk

Discussion in 'General' started by otavioacosta, Oct 14, 2008.

  1. otavioacosta

    Joined:
    Oct 3, 2008
    Messages:
    4
    Likes Received:
    0
    Good afternoon.
    On my server I have created three trunks. Two trunks is a gateway FXO and the third comes from a VoIP line that we have with a company here in Brazil. I can usually make calls by the three trunks, but only when change the context of the branch I'm using.
    I created a context in extensions.conf where he detects a number that type before the phone number and thus guides the connection desired by the trunk.
    For example, to dial 1 + phone number, it sends the trunk 1, the 2 + phone number, it sends the trunk 2, the 3 + phone number, it sends the trunk of the carrier voip. But in the first two, he 's dialing 1 + number, then get the answer to my telephone operator that the phone does not exist, whereas when disc 3 (voip carrier) to connect usually happens. Is there a rule in which, after detecting the number that determines which trunk by going out, I delete this digit and sent to the gateway FXO only the phone number?
    The rule that was created as follows:

    [ext-local]
    exten =>_1.,1,Dial(SIP/${EXTEN:1}@trunk4457,50)
    exten =>_2.,1,Dial(SIP/${EXTEN:1}@trunk4458,50)
    exten =>_3.,1,Dial(SIP/${EXTEN:1}@trunkvono,50)

    Maybe this is not the most intelligent, then by chance someone has a more clever solution?
    Hugs and thanks.

    Sorry for the English ...
     
  2. alang

    Joined:
    Mar 19, 2008
    Messages:
    47
    Likes Received:
    0
    Why don't use 'Outbound Routes', I think that's only a common usage or I missed some things.
     

Share This Page