[Asterisk-Users] Routing SIP calls via URI

Shad Mortazavi Shad.Mortazavi at nexusmgmt.com
Sat Apr 1 09:13:17 MST 2006


Dear Group,

I was able to fix this problem;

The solution was to use a prefix to dial out. 

The next challenge was to send the SIP Domain over IAX2!. I found that
if I included @SIPDOMAIN it would break the IAX2 communications.

exten => _6.,1,Dial(IAX2/bxxxxxx:yyyyyy at 192.X.y.x/${EXTEN}@SIPDOMAIN),
breakes because @SIPDOMAIN is treated as the target context. You also
can not include @Context after the @SIPDOMAIN.

I created a new variable DS which was a concatenation of EXTEN and
SIPDOMAIN separated by % and not @ and I was now able to pass this over
IAX2;

DS = EXTEN%SIPDOMAIN.

exten => _6.,1,Dial(IAX2/bxxxxxx:yyyyyy at 192.X.y.x/${DS}).

At the other end I used the CUT command and substring facilities in
Asterisk to split DS by the % eliminator; I re-formed a new variable
which was 

DS = EXTEN at SIPDOMAIN.

I can now pass calls from my internal Asterisk server to my external
Asterisk server using IAX2 and then call any external VoIP number.

Warm Regards

Shad Mortazavi
------------------------------
Nexus Group Technical Manager
n|m Nexus Management Inc

-----Original Message-----
From: Shad Mortazavi 
Sent: Thursday, March 30, 2006 10:30 AM
To: asterisk-users at lists.digium.com
Subject: Re: [Asterisk-Users] Routing SIP calls via URI

Dear Group;

I can confirm that I have read through the three examples in
www.voip-info.org. 

These examples are excellent and address a couple of the questions. I
have IAX2 working between several asterisk servers on our VPN and
between the DMZ and our LAN. 

Also

exten => shad,1,Dial(IAX2/bxxxxxx:yyyyyy at 192.X.y.x/${EXTEN})

This answers part of the question;

However what I want to do is to send any outbound sip calls via our
external SIP server.

i.e;
	         VPN      LAN		 IAX2    DMZ	  Internet
Internal UA <-------> Internal (*) <------> External (*)<------>
ExternalUA

We have an extensive internal dial plan, X dial the UK, Y dial USA, 1XXX
for Voicemail, 2xxx for Meetme, etc. 

Do I need to setup a prefix to dial the internet? And then route all
calls to the External(*) based on this prefix?

Thanks

Shad Mortazavi
------------------------------
Nexus Group Technical Manager
n|m Nexus Management Inc





More information about the asterisk-users mailing list