inbound route for direct SIP connections?

Discussion in 'General' started by Patrick_elx, Jan 21, 2009.

  1. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    How can I create an inbound route for calls directed to my pbx directly ie sip:blahblah@mydomain.com

    I have created an inbound route with DID:Any and CID:any and accept anonymous sip call to at least receive the calls, but I would like to be able to create different routes depending on the sip address that is used.

    Specially for people using ENUM on my DIDs, I'm loosing the DID information in the process (even if I've registered each DID with a different sip address).
     
  2. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    I've made some good progress.

    if I dial sip:extension@mydomain.com it is routed to extension
    if I dial sip:did@mydomain.com it will be routed to the inbound route that has the did

    my problem was in fact with zoiper and X-lite.

    when I dial sip:blahblah@mydomain.com with Zoiper Asterisk does not detect any extension in
    [from-sip-external]
    exten => _.,1,NoOp(Received incoming SIP connection from unknown peer to ${EXTEN})
    exten => _.,n,Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})})
    exten => _.,n,Goto(s,1)
    exten => s,1,GotoIf($["${ALLOW_SIP_ANON}"="yes"]?from-trunk,${DID},1)


    and then go directly to the [from-trunk]

    now, if I dial the same with x-lite, the blahblah is seen as an extension, and will be converted as DID by the [from-sip-external] to be able to be routed correctly...


    Patrick
     
  3. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    now if you want to avoid that external sip connections can dial directly to an extension and bypass your inbound routes you can add in extensions_override_freepbx.conf

    [from-pstn]
    include => from-pstn-custom
    include => ext-did
    include => ext-did-post-custom
    ;include => from-did-direct
    include => ext-did-catchall
    exten => fax,1,Goto(ext-fax,in_fax,1)


    That's just a copy of the [from-pstn] context from extension.conf with the include => from-did-direct commented out.
     

Share This Page