[OpenSIPS-Users] Routing in opensips

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Oct 3 10:44:26 CEST 2016


Hi Eric,

Not the OpenSIPs logs I'm looking for, but the actual SIP packet at 
network level (use ngrep or tcpdump) for the INVITE leaving your OpenSIPS.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 30.09.2016 16:52, Eric Freeman wrote:
>
> Hopefully this is the relevant information you need from the log. I am 
> trying to call 111 at 199.48.152.152. The IP of the opensips server si 
> 10.88.23.10 and has a public IP of 204.17.231.3.  The IP address of 
> the video conference server is 10.89.71.12.
>
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_msg: SIP Request:
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_msg:  method:  <INVITE>
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_msg:  uri: <sip:111 at 199.48.152.152>
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_msg:  version: <SIP/2.0>
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_headers: flags=2
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_to: end of header reached, state=10
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_to: display={}, ruri={sip:111 at 199.48.152.152}
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:get_hdr_field: <To> [26]; uri=[sip:111 at 199.48.152.152]
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:get_hdr_field: to body [<sip:111 at 199.48.152.152>#015#012]
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:get_hdr_field: cseq <CSeq>: <1> <INVITE>
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_via_param: found param type 235, <rport> = <n/a>; state=6
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_via_param: found param type 232, <branch> = 
> <z9hG4bK-57ed3cdd-76b5c304-9584dff>; state=16
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_via: end of header reached, state=5
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_headers: via found, flags=2
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_headers: this is the first via
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:receive_msg: After parse_msg...
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:receive_msg: preparing to run routing scripts...
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_headers: flags=100
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:maxfwd:is_maxfwd_present: value = 70
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:uri:has_totag: no totag
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_headers: flags=78
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:tm:t_lookup_request: start searching: hash=25578, isACK=0
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:tm:matching_3261: RFC3261 transaction matching failed
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:tm:t_lookup_request: no transaction found
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_to_param: 
> tag=2c770a98-c47590a-13c4-45026-57ed3cdd-1bac9941-57ed3cdd
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_to: end of header reached, state=29
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_to: display={"Conference Room"}, 
> ruri={sip:LifeSize at 10.88.23.13;transport=UDP}
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:grep_sock_info: checking if host==us: 11==11 && 
>  [10.88.23.13] == [10.88.23.13]
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:grep_sock_info: checking if port 5060 matches port 5060
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_headers: flags=200
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:get_hdr_field: content_length=1759
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:get_hdr_field: found end of header
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:rr:find_first_route: No Route headers found
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:grep_sock_info: checking if host==us: 14==11 && 
>  [199.48.152.152] == [10.88.23.13]
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:grep_sock_info: checking if port 5060 matches port 5060
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:grep_sock_info: checking if host==us: 14==11 && 
>  [199.48.152.152] == [10.88.23.13]
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:grep_sock_info: checking if port 5060 matches port 5060
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:check_self: host != me
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:parse_headers: flags=ffffffffffffffff
>
> Sep 29 12:10:17 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
> DBG:core:do_action_set_adv_address: setting adv address = [204.17.231.3]
>
>
> Eric Freeman
>
> Technical Director/NA for TBWA\Chiat\Day
>
> TBWA\Chiat\Day New York
> 488 Madison Ave.
> New York NY 10022
> United States of America
> Tel: +12128041324 <tel:%2B12128041324>
> ------------------------------------------------------------------------
> *From:* Bogdan-Andrei Iancu <bogdan at opensips.org>
> *Sent:* Friday, September 30, 2016 4:32:01 AM
> *To:* Eric Freeman; OpenSIPS users mailling list
> *Subject:* Re: [OpenSIPS-Users] Routing in opensips
> Hi Eric,
>
> As a first step, can you confirm that the INVITE (sent out by your 
> OPenSIPS to the internet) has in VIA hdr the public IP of your NAT ?
>
> Best regards,
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
> On 29.09.2016 19:14, Eric Freeman wrote:
>>
>> It is still not working, I added my public IP as requested. I do not 
>> have any gateways or anything set up. Do I need to add anything?
>>
>> I added this to the route statement:
>>
>>
>> if (!uri==myself) {
>>
>> append_hf("P-hint: outbound\r\n");
>>
>> set_advertised_address("XXX.XX.XXX.X");
>>
>> route(relay);
>>
>>
>> I am still receiving these errors:
>>
>> Sep 29 12:10:22 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
>> DBG:rr:find_first_route: No Route headers found
>>
>> Sep 29 12:10:22 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
>> DBG:rr:loose_route: There is no Route HF
>>
>> Sep 29 12:10:22 cd-ubuntu-opensips /usr/local/sbin/opensips[12878]: 
>> DBG:core:parse_headers: flags=78
>>
>>
>>
>> Eric Freeman
>>
>> Technical Director/NA for TBWA\Chiat\Day
>>
>> TBWA\Chiat\Day New York
>> 488 Madison Ave.
>> New York NY 10022
>> United States of America
>> Tel: +12128041324 <tel:%2B12128041324>
>> ------------------------------------------------------------------------
>> *From:* Bogdan-Andrei Iancu <bogdan at opensips.org>
>> *Sent:* Tuesday, September 20, 2016 8:38:31 AM
>> *To:* Eric Freeman; OpenSIPS users mailling list
>> *Subject:* Re: [OpenSIPS-Users] Routing in opensips
>> He Eric,
>>
>> In the script (generated by menuconfig), you have an IF block with :
>>     append_hf("P-hint: outbound\r\n");
>>
>> That block is executed if one of your users is dialing an external 
>> SIP domain. So, that is the place where the calls will break out to 
>> public internet.
>>
>> As your OpenSIPS has a private IP (not routable in internet), you 
>> need to configure it to advertise the public IP of your NAT via the 
>> set_advertise_address() - see:
>> http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc46
>>
>> Put there the public IP of your NAT. Also, be sure you create in your 
>> router (running the NAT) a port forwarding from the public IP port 
>> 5060 UDP to the private IP of your OpenSIPS port 5060 UDP.
>>
>> Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161003/5f2a6edc/attachment-0001.htm>


More information about the Users mailing list