Re: [Asterisk-Users] Routing SIP calls via URI
Have you tried this guy's suggestion? (I have not, yet)http://slacker.com/~nugget/projects/asterisk/page7--JW- Original Message From: Joao Pereira [EMAIL PROTECTED]To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.comSent: Thursday, April 6, 2006 7:44:56 AMSubject: Re: [Asterisk-Users] Routing SIP calls via URIBut is there a way of doing this without a prefix?because people should dial without prefixes: "[EMAIL PROTECTED]" , not like:"[EMAIL PROTECTED]"How can we make this without a prefix? something like:if( !uri=~"@mydomain.pt" ){ forward the all to the Internet}:)ThanksJoao PereiraShad Mortazavi wrote: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 thatif I included @SIPDOMAIN it would break the IAX2 communications.exten = _6.,1,Dial(IAX2/bxx:[EMAIL PROTECTED]/[EMAIL PROTECTED]),breakes because @SIPDOMAIN is treated as the target context. You alsocan not include @Context after the @SIPDOMAIN.I created a new variable DS which was a concatenation of EXTEN andSIPDOMAIN separated by % and not @ and I was now able to pass this overIAX2;DS = EXTEN%SIPDOMAIN.exten = _6.,1,Dial(IAX2/bxx:[EMAIL PROTECTED]/${DS}).At the other end I used the CUT command and substring facilities inAsterisk to split DS by the % eliminator; I re-formed a new variablewhich was DS = [EMAIL PROTECTED]I can now pass calls from my internal Asterisk server to my externalAsterisk server using IAX2 and then call any external VoIP number.Warm RegardsShad Mortazavi--Nexus Group Technical Managern|m Nexus Management Inc-Original Message-From: Shad Mortazavi Sent: Thursday, March 30, 2006 10:30 AMTo: asterisk-users@lists.digium.comSubject: Re: [Asterisk-Users] Routing SIP calls via URIDear Group;I can confirm that I have read through the three examples inwww.voip-info.org. These examples are excellent and address a couple of the questions. Ihave IAX2 working between several asterisk servers on our VPN andbetween the DMZ and our LAN. Alsoexten = shad,1,Dial(IAX2/bxx:[EMAIL PROTECTED]/${EXTEN})This answers part of the question;However what I want to do is to send any outbound sip calls via ourexternal SIP server.i.e; VPNLAN IAX2DMZInternetInternal UA --- Internal (*) -- External (*)--ExternalUAWe have an extensive internal dial plan, X dial the UK, Y dial USA, 1XXXfor Voicemail, 2xxx for Meetme, etc. Do I need to setup a prefix to dial the internet? And then route allcalls to the External(*) based on this prefix?ThanksShad Mortazavi--Nexus Group Technical Managern|m Nexus Management Inc___--Bandwidth and Colocation provided by Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users___--Bandwidth and Colocation provided by Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Routing SIP calls via URI
But is there a way of doing this without a prefix? because people should dial without prefixes: [EMAIL PROTECTED] , not like: [EMAIL PROTECTED] How can we make this without a prefix? something like: if( !uri=~@mydomain.pt ){ forward the all to the Internet } :) Thanks Joao Pereira Shad Mortazavi wrote: 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/bxx:[EMAIL PROTECTED]/[EMAIL PROTECTED]), 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/bxx:[EMAIL PROTECTED]/${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 = [EMAIL PROTECTED] 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@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/bxx:[EMAIL PROTECTED]/${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 LANIAX2DMZ 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 ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: Re: [Asterisk-Users] Routing SIP calls via URI
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/bxx:[EMAIL PROTECTED]/[EMAIL PROTECTED]), 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/bxx:[EMAIL PROTECTED]/${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 = [EMAIL PROTECTED] 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@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/bxx:[EMAIL PROTECTED]/${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 LANIAX2DMZ 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 ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
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/bxx:[EMAIL PROTECTED]/${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 LANIAX2DMZ 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 ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: Re: [Asterisk-Users] Routing SIP calls via URI
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:[EMAIL PROTECTED]) If I dial sip:[EMAIL PROTECTED] 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:[EMAIL PROTECTED]) This all works! The problem is it only works if I dial a user that exists on the SER Server. eg sip:[EMAIL PROTECTED] . It breaks if I call [EMAIL PROTECTED] 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 [EMAIL PROTECTED] it is translated to [EMAIL PROTECTED] ! 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@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/bxx:[EMAIL PROTECTED]/${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 LANIAX2DMZ 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 ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Routing SIP calls via URI
Shad Mortazavi wrote: What I would like to do is to redirect external SIP calls to our external Asterisk server. e.g if I call sip:[EMAIL PROTECTED] I would like the call to be routed from our Internal Asterisk server to our External Asterisk server via IAX2 and for the external asterisk server to act as a UA and make the call. I have tried the following syntax on our internal server; exten = _sip.,1,Dial(IAX2/bxx:[EMAIL PROTECTED]/${EXTEN}) However this does not seem to work? Have you tried this? exten = shad,1,Dial(IAX2/bxx:[EMAIL PROTECTED]/${EXTEN}) ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Routing SIP calls via URI
I believe that they covered this exact procedures at www.voip-info.org. Look for the topic on connecting two Asterisk servers. They outline three different ways that you can do so. From: Eric \ManxPower\ Wieling [EMAIL PROTECTED] Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] Routing SIP calls via URI Date: Wed, 29 Mar 2006 13:18:07 -0600 Shad Mortazavi wrote: What I would like to do is to redirect external SIP calls to our external Asterisk server. e.g if I call sip:[EMAIL PROTECTED] I would like the call to be routed from our Internal Asterisk server to our External Asterisk server via IAX2 and for the external asterisk server to act as a UA and make the call. I have tried the following syntax on our internal server; exten = _sip.,1,Dial(IAX2/bxx:[EMAIL PROTECTED]/${EXTEN}) However this does not seem to work? Have you tried this? exten = shad,1,Dial(IAX2/bxx:[EMAIL PROTECTED]/${EXTEN}) ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users