[Asterisk-Users] Routing SIP calls via URI

Shad Mortazavi Shad.Mortazavi at nexusmgmt.com
Thu Mar 30 09:42:44 MST 2006


Dear Group;

I am closer to where I want to be. I could still do with some help.

For my Internal(*)I setup the following;

extensions.conf
---------------
[SIPOUT]
exten => _6.,1,Dial(SIP/${EXTEN:1}@192.y.x.1x0)

If I dial sip:6shad at blablabla.com I see the call go to the External(*)

In my external server I have;

Sip.conf
---------
[sip_proxy-out]
type=peer                      ; we only want to call out, not be called
secret=****
username=nexus***              ; Authentication user for outbound
proxies
fromuser=nexus***              ; Many SIP providers require this!
fromdomain=****.***.com
host=********
usereqphone=yes                

and in the extensions.conf I have;

exten =>_6.,1,Dial(SIP/${EXTEN:1}@sip_proxy-out)

This all works! 

The problem is it only works if I dial a user that exists on the SER
Server. eg sip:6shad@****.***.com . 

It breaks if I call 555555555 at voiptalk.org.

When I look at the INVITE packets the URI is being transformed when it
goes from the Internal(*) to the external (*) over IAX2. Rather than
being 555555555 at voiptalk.org. it is translated to russia at voiptalk.org !
This explains why calls to users on the SER server work.

I would appreciate an explanation of this phenomena and how to preserver
my URI going form the internal(*) to the external(*).

Warm Regards and Thanks

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