Koozali.org: home of the SME Server

Sail to Sail IAX set up

Offline paul_xedos

  • *
  • 8
  • +0/-0
Sail to Sail IAX set up
« on: January 23, 2008, 02:13:46 PM »
Actually its Sail PBX to an AsteriskNow PBX set up issue but I clicked on SailToSail as part of the NewTrunk setup. My problem is one of understanding the route an incoming call takes and what the following line found in extensions conf added by the gui does as it does not appear to be acted on
        exten => astnowsme,1,agi(selintra,Inbound,${EXTEN})

With iax and sip debug enabled both sides and commenting out various bits, I can see that a call comes in - goes to the correct extension via the default context and as far as I can see does not use the above statement. Its more a thing of curiosity, wondering how its used, as the incoming call goes to the default context rather than the mainmenu context

My set up is as follows:-
sme server - extension numbers = 5XXX
astnow server - extension numbers = 7XXX


extensions.conf (cut down version) on sme server
Code: [Select]
[default]
          include => extensions
        exten => _7XXX,1,agi(selintra,OutRoute,sme2astnow)

[extensions]

        exten => 5004,hint,SIP/5004
        exten => 5004,1,agi(selintra,InCall,)
        exten => 5004,1,Goto(extensions,5004,1)

[mainmenu]
      include => extensions
        exten => astnowsme,1,agi(selintra,Inbound,${EXTEN})

and  Iax.conf on sme server
Code: [Select]
[smeastnow]
type=friend
host=10.4.38.35
qualify=3000
canreinvite=no
username=smeastnow
fromuser=smeastnow
secret=asterisk
trunk=yes
;disallow=all
;allow=alaw
;allow=ulaw
allow=all

[astnowsme]
type=user
secret=asterisk
context=default



Thanks
Paul
« Last Edit: January 23, 2008, 03:15:11 PM by paul_xedos »

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Sail to Sail IAX set up
« Reply #1 on: January 23, 2008, 05:46:09 PM »
Hello Paul,

Quote
exten => astnowsme,1,agi(selintra,Inbound,${EXTEN})

Good detective work.  You are quite correct, the key is redundant.   So...  Why did those Selintra kiddies leave it there then?  (Which is what I guess you are asking).   It's to do with the structure of the Selintra database and the trunk keys.  Regular SIP and IAX trunks are keyed upon the DNID (dialled number).  In other words,  they can be selected in the dial plan.  Sibling keys are meaningless left, and right, hand concatenations which just make it easy for us to construct the iax.conf code.  During dialplan generation, the Sibling keys (which are valid trunk keys, even if they are NOT valid DNIDs) get processed and generated along with the regular SIP, IAX and PTT-DiD keys.  We could remove them but they do no harm and besides, it would mean more work (which we aren't over keen on).

Btw the inbound route doesn't really exist.  We just let asterisk sort the call into the dialplan for the context. So... it selects the extension directly.  We don't actually have to do anything for that to happen (which is just as well, because we'd probably screw it up :)  )

 
Kind Regards

S

Offline paul_xedos

  • *
  • 8
  • +0/-0
Re: Sail to Sail IAX set up
« Reply #2 on: January 23, 2008, 09:39:48 PM »
Selintra,

That's great. Thanks for taking the time clear that up. The question was part curiosity and part me thinking that I was not using the dialplan in the correct manner

Rgds
Paul