how to handle returned sip 302 dialplan
Good morning everybody, I would like to know what would be the best way to process the info in returned back sip 302 message. Let me be a bit more specific. i'm sending INVITE as pasted below to z.z.z.z *INVITE* sip:17402740539@z.z.z.z:5000 SIP/2.0^M Via: SIP/2.0/UDP z.z.z.z:5000;branch=z9hG4bK215b.e6ae7e74.0^M Via: SIP/2.0/UDP y.y.y.y:5060;branch=z9hG4bKaa6257694041475e0659eeb0019a0bbc^M *From: "Bob Caller" <sip:6144102508@y.y.y.y:5060>;tag=CCC7.1F37^M To: <sip:17402740539@x.x.x.x:5060>^M *Call-ID: 15821337-3367080415-112396@msc-01.voice.example.net^M CSeq: 1 INVITE^M Contact: <sip:6144102508@y.y.y.y:5060>^M Content-Type: application/sdp^M Max-forwards: 69^M Session-expires: 3600;Refresher=uac^M Supported: timer^M Content-Length: 200^M ^M 1192 v=0^M o=iserver 16123 16124 IN IP4 y.y.y.y^M s=sip call^M c=IN IP4 64.112.188.81^M t=0 0^M m=audio 55824 RTP/AVP 18 0 101^M a=sendrecv^M a=fmtp:101 0-15^M a=rtpmap:101 telephone-event/8000^M a=ptime:20^M the reply from z.z.z.z back is sip 302 SIP/2.0 *302 Moved Temporarily*^M Via: SIP/2.0/UDP z.z.z.z:5000;branch=z9hG4bK215b.e6ae7e74.0^M Via: SIP/2.0/UDP y.y.y.y:5060;branch=z9hG4bKaa6257694041475e0659eeb0019a0bbc^M From: "Bob Caller" <sip:6144102508@y.y.y.y:5060>;tag=CCC7.1F37^M To: <sip:17402740539@x.x.x.x:5060>;tag=1087415105^M Call-ID: 15821337-3367080415-112396@msc-01.voice.example.net^M CSeq: 1 INVITE^M *Contact: <sip:2145551234@64.112.188.84>;npdi^M *User-Agent: eXosip/3.1.0^M Content-Length: my question is: Is it possible to send the call to z.z.z.z , receive the SIP 302 , process the data in Contact field and redirect to the new destination contained in *Contact: <sip:2145551234@64.112.188.84>;npdi^M *without closing the session. i red something about <action application="set" data="continue_on_fail=true"/> but i'm not sure how to use it. Any ideas on this matter will be highly appreciated. Best Regards Chav
Chav, Once the 302 is received by FreeSWITCH it will follow it to the contact listed in the 302. What else are you needing to do? /b On Dec 13, 2008, at 2:24 PM, Chav Paskov wrote:
*User-Agent: eXosip/3.1.0^M Content-Length:
my question is:
Is it possible to send the call to z.z.z.z , receive the SIP 302 , process the data in Contact field and redirect to the new destination contained in *Contact: <sip:2145551234@64.112.188.84>;npdi^M *without closing the session. i red something about <action application="set" data="continue_on_fail=true"/> but i'm not sure how to use it.
Any ideas on this matter will be highly appreciated. Best Regards Chav
Brian West wrote:
Chav, Once the 302 is received by FreeSWITCH it will follow it to the contact listed in the 302. What else are you needing to do?
/b
On Dec 13, 2008, at 2:24 PM, Chav Paskov wrote:
*User-Agent: eXosip/3.1.0^M Content-Length:
my question is:
Is it possible to send the call to z.z.z.z , receive the SIP 302 , process the data in Contact field and redirect to the new destination contained in *Contact: <sip:2145551234@64.112.188.84>;npdi^M *without closing the session. i red something about <action application="set" data="continue_on_fail=true"/> but i'm not sure how to use it.
Any ideas on this matter will be highly appreciated. Best Regards Chav
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thanks Brian, probably i should have explained it in more details. this whole thing started as an attempt to implement lata ocn /local number portability/ instead of pure per destination routing. At the moment i have a access to a service provider who does "dipping" and returns the LATA OCN data associated with any dialed destination number. it is returned as Contact: and Content-length: fields in 302 message. in other words: 1. i'm sending to this provider let say - 2025556666 as a destination number. 2. they do the dipping and will return to me either the new dest # if 2025556666 has been ported or if it was not in content-length field they'll send lata, ocn and state and 10 digits number. 3. once received i have to compare the received lata , ocn and state date with a compiled rate deck / blended from 5 different vendors/ and pick the lowest rate - effectively building LCR based on LATA OCN STATE info. Hope this will help to clear the picture. Regards Chav
Chav Paskov wrote:
Brian West wrote:
Chav, Once the 302 is received by FreeSWITCH it will follow it to the contact listed in the 302. What else are you needing to do?
/b
On Dec 13, 2008, at 2:24 PM, Chav Paskov wrote:
*User-Agent: eXosip/3.1.0^M Content-Length:
my question is:
Is it possible to send the call to z.z.z.z , receive the SIP 302 , process the data in Contact field and redirect to the new destination contained in *Contact: <sip:2145551234@64.112.188.84>;npdi^M *without closing the session. i red something about <action application="set" data="continue_on_fail=true"/> but i'm not sure how to use it.
Any ideas on this matter will be highly appreciated. Best Regards Chav
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thanks Brian,
probably i should have explained it in more details. this whole thing started as an attempt to implement lata ocn /local number portability/ instead of pure per destination routing. At the moment i have a access to a service provider who does "dipping" and returns the LATA OCN data associated with any dialed destination number. it is returned as Contact: and Content-length: fields in 302 message.
in other words:
1. i'm sending to this provider let say - 2025556666 as a destination number. 2. they do the dipping and will return to me either the new dest # if 2025556666 has been ported or if it was not in content-length field they'll send lata, ocn and state and 10 digits number. 3. once received i have to compare the received lata , ocn and state date with a compiled rate deck / blended from 5 different vendors/ and pick the lowest rate - effectively building LCR based on LATA OCN STATE info.
Hope this will help to clear the picture. Regards Chav
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Chav, We recently / are still going through the same process (in order to route on LRN) vs NPANXX or LATA based routing. Here was the best way that we came up with to do it: -- we use xml_curl exclusively for routing decisions -- so in the cgi script that xml_curl hits one of the things it can (and does based on certain parameters) is fire off a url to another LNP server that we built -- the LNP server actually does the dip (either from a cache) and returns the info We felt this was much better for a few reasons: -- caching the LNP data for a 24 hour period would save us in excess of $100k a year -- having a specialized mechanism to do this was much easier to implement for the cgi process than supporting 302 redirects directly on the FS boxes was much easier (which just wasn't possible with the cgi mechanism) -- every LNP provider returns 302's slightly different ... so we didn't want to have to reinvent the wheel on the FS machines if we ever wanted to add redundancy or switch providers Guess it all depends on your config ... but this was the easiest and most cost-effective means for us to implement. On Sat, Dec 13, 2008 at 6:38 PM, Chav Paskov <chavpaskov@shaw.ca> wrote:
Brian West wrote:
Chav, Once the 302 is received by FreeSWITCH it will follow it to the contact listed in the 302. What else are you needing to do?
/b
On Dec 13, 2008, at 2:24 PM, Chav Paskov wrote:
*User-Agent: eXosip/3.1.0^M Content-Length:
my question is:
Is it possible to send the call to z.z.z.z , receive the SIP 302 , process the data in Contact field and redirect to the new destination contained in *Contact: <sip:2145551234@64.112.188.84<sip%3A2145551234@64.112.188.84> ;npdi^M *without closing the session. i red something about <action application="set" data="continue_on_fail=true"/> but i'm not sure how to use it.
Any ideas on this matter will be highly appreciated. Best Regards Chav
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thanks Brian,
probably i should have explained it in more details. this whole thing started as an attempt to implement lata ocn /local number portability/ instead of pure per destination routing. At the moment i have a access to a service provider who does "dipping" and returns the LATA OCN data associated with any dialed destination number. it is returned as Contact: and Content-length: fields in 302 message.
in other words:
1. i'm sending to this provider let say - 2025556666 as a destination number. 2. they do the dipping and will return to me either the new dest # if 2025556666 has been ported or if it was not in content-length field they'll send lata, ocn and state and 10 digits number. 3. once received i have to compare the received lata , ocn and state date with a compiled rate deck / blended from 5 different vendors/ and pick the lowest rate - effectively building LCR based on LATA OCN STATE info.
Hope this will help to clear the picture. Regards Chav
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Shelby Ramsey wrote:
Chav,
We recently / are still going through the same process (in order to route on LRN) vs NPANXX or LATA based routing. Here was the best way that we came up with to do it: -- we use xml_curl exclusively for routing decisions -- so in the cgi script that xml_curl hits one of the things it can (and does based on certain parameters) is fire off a url to another LNP server that we built -- the LNP server actually does the dip (either from a cache) and returns the info
We felt this was much better for a few reasons: -- caching the LNP data for a 24 hour period would save us in excess of $100k a year -- having a specialized mechanism to do this was much easier to implement for the cgi process than supporting 302 redirects directly on the FS boxes was much easier (which just wasn't possible with the cgi mechanism) -- every LNP provider returns 302's slightly different ... so we didn't want to have to reinvent the wheel on the FS machines if we ever wanted to add redundancy or switch providers
Guess it all depends on your config ... but this was the easiest and most cost-effective means for us to implement.
On Sat, Dec 13, 2008 at 6:38 PM, Chav Paskov <chavpaskov@shaw.ca <mailto:chavpaskov@shaw.ca>> wrote:
Brian West wrote: > Chav, > Once the 302 is received by FreeSWITCH it will follow it to the > contact listed in the 302. What else are you needing to do? > > /b > > On Dec 13, 2008, at 2:24 PM, Chav Paskov wrote: > >> *User-Agent: eXosip/3.1.0^M >> Content-Length: >> >> >> my question is: >> >> Is it possible to send the call to z.z.z.z , receive the SIP 302 , >> process the data in Contact field and redirect to the new destination >> contained in *Contact: <sip:2145551234@64.112.188.84 <mailto:sip%3A2145551234@64.112.188.84>>;npdi^M >> *without closing the session. >> i red something about <action application="set" >> data="continue_on_fail=true"/> but i'm not sure how to use it. >> >> Any ideas on this matter will be highly appreciated. >> Best Regards >> Chav >> > > ------------------------------------------------------------------------ > > _______________________________________________ > Freeswitch-users mailing list > Freeswitch-users@lists.freeswitch.org <mailto:Freeswitch-users@lists.freeswitch.org> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org > Thanks Brian,
probably i should have explained it in more details. this whole thing started as an attempt to implement lata ocn /local number portability/ instead of pure per destination routing. At the moment i have a access to a service provider who does "dipping" and returns the LATA OCN data associated with any dialed destination number. it is returned as Contact: and Content-length: fields in 302 message.
in other words:
1. i'm sending to this provider let say - 2025556666 as a destination number. 2. they do the dipping and will return to me either the new dest # if 2025556666 has been ported or if it was not in content-length field they'll send lata, ocn and state and 10 digits number. 3. once received i have to compare the received lata , ocn and state date with a compiled rate deck / blended from 5 different vendors/ and pick the lowest rate - effectively building LCR based on LATA OCN STATE info.
Hope this will help to clear the picture. Regards Chav
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto:Freeswitch-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
thanks for the prompt response. Can you pls give me an example how to access the info contained in Contact: and content-legth: fields if you can. I was thinking in going the exactly same direction in terms of building xml_curl dialplan but i'm lacking knowledge on how to access variables. Regards Chav
I fear that you won't be able to get at any information in a 302 issued to FreeSWITCH as those are on auto pilot. You can try toying with the info application to see if it gets at the info you need. /b On Dec 15, 2008, at 10:45 AM, Chav Paskov wrote:
thanks for the prompt response. Can you pls give me an example how to access the info contained in Contact: and content-legth: fields if you can. I was thinking in going the exactly same direction in terms of building xml_curl dialplan but i'm lacking knowledge on how to access variables. Regards Chav
participants (3)
-
Brian West
-
Chav Paskov
-
Shelby Ramsey