[OpenSIPS-Users] opensips+asterisk: signalling not working?
Hello folks, here I am again :) I have a setup where I use opensips as registration+proxy and asterisk as media gateway. When I place a call I can correctly hear the call audio (so RTP flow is ok), and the callee can hear my voice too, but after 20 seconds the call hangs up. In the asterisk logs I found the following lines: [Oct 6 10:29:54] WARNING[25602]: chan_sip.c:3778 retrans_pkt: Maximum retries exceeded on transmission NjZjMmI2MWRlYmY0YWYwMGVhYTAyNmE0NzU4OWU5YTk. for seqno 2 (Critical Response) -- See doc/sip-retransmit.txt. [Oct 6 10:29:54] WARNING[25602]: chan_sip.c:3805 retrans_pkt: Hanging up call NjZjMmI2MWRlYmY0YWYwMGVhYTAyNmE0NzU4OWU5YTk. - no reply to our critical packet (see doc/sip-retransmit.txt). it seems that the signalling that pass through opensips does not work correctly... this is a part of my asterisk configuration: rtpstart=10001 rtpend=15000 externip = 77.238.xx.yy localnet=192.168.6.131/255.255.255.255 localnet=192.168.6.132/255.255.255.255 [ser_phones] type=friend context=from_inbound_ser host=192.168.6.130 insecure=very disallow=all allow=gsm opensips.cfg (relevant parts, not modules config.) route{ if (!mf_process_maxfwd_header(10)) { sl_send_reply(483,Too Many Hops); exit; } if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method(BYE)) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails } else if (is_method(INVITE)) { # even if in most of the cases is useless, do RR for # re-INVITEs alos, as some buggy clients do change route set # during the dialog. record_route(); } # route it out to whatever destination was set by loose_route() # in $du (destination URI). route(1); } else { if ( is_method(ACK) ) { if ( t_check_trans() ) { # non loose-route, but stateful ACK; must be an ACK after # a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction - # ignore and discard exit; } } sl_send_reply(404,Not here); } exit; } #initial requests # CANCEL processing if (is_method(CANCEL)) { if (t_check_trans()) t_relay(); exit; } t_check_trans(); # authenticate if from local subscriber if (!(method==REGISTER) is_from_local()) /*multidomain version*/ { if (!proxy_authorize(, subscriber)) { proxy_challenge(, 0); exit; } if (!db_check_from()) { sl_send_reply(403,Forbidden auth ID); exit; } consume_credentials(); # caller authenticated xlog([AUTH] PROXY for $fu ($si:$sp) OK); } # preloaded route checking if (loose_route()) { xlog(L_ERR, Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]); if (!is_method(ACK)) sl_send_reply(403,Preload Route denied); exit; } # record routing if (!is_method(REGISTER|MESSAGE)) record_route(); # account only INVITEs if (is_method(INVITE)) { setflag(1); # do accounting setflag(2); # for success or missed call xlog([SIP_INVITE] sip_from=$fu sip_to=$ru c_from=$fU c_to=$rU client=$si:$sp call_id=$ci c_seq=$cs); } if (!is_uri_host_local()) { append_hf(P-hint: outbound\r\n); xlog([OUTBOUND_NL] Routing message from $si); route(1); } # requests for my domain if (is_method(REGISTER)) { xlog(Enter REGISTER from $si:$sp); # authenticate the REGISTER requests (uncomment to enable auth) $var(auth_code) = www_authorize(, subscriber); if (
[OpenSIPS-Users] issue compiling opensips 1.6.3
Hello, When I tried to compile 1.6.3 I got this issue Compiling ha.c gcc -fPIC -DPIC -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -mtune=pentium4 -DMOD_NAME='seas'-DNAME='opensips' -DVERSION='1.6.3-notls' -DARCH='i386' -DOS='linux' -DCOMPILER='gcc 3.4.6' -D__CPU_i386 -D__OS_linux -D__SMP_yes -DCFG_DIR='/usr/local/etc/opensips/' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DSTATISTICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SIGIO_RT -DHAVE_SELECT -c ha.c -o ha.o In file included from ha.c:26: ha.h:29: error: field `sent' has incomplete type make[1]: *** [ha.o] Error 1 make[1]: Leaving directory `/root/opensips-1.6.3-notls/modules/seas' make: *** [modules] Error 2 Any advice to fix it? Thanks Stefano ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
Hi Stefano, The 20s timeout is typically an ACK timeout (as someone reminded it on the list some time ago.) The asterisk log you pasted confirm it: the final ACK never reaches back Opensips so the dialog is cut down after the timeout. Make a sip trace on your asterisk box to see where the ACK is sent. Maybe you need to enable nat on asterisk to force it to send the ACK to the originating IP and not the IP of the contact field. Have a look at http://www.voip-info.org/wiki/view/Asterisk+sip+nat Regards, - vma . On Oct 6, 2010, at 11:11 AM, Stefano Sasso wrote: Hello folks, here I am again :) I have a setup where I use opensips as registration+proxy and asterisk as media gateway. When I place a call I can correctly hear the call audio (so RTP flow is ok), and the callee can hear my voice too, but after 20 seconds the call hangs up. In the asterisk logs I found the following lines: [Oct 6 10:29:54] WARNING[25602]: chan_sip.c:3778 retrans_pkt: Maximum retries exceeded on transmission NjZjMmI2MWRlYmY0YWYwMGVhYTAyNmE0NzU4OWU5YTk. for seqno 2 (Critical Response) -- See doc/sip-retransmit.txt. [Oct 6 10:29:54] WARNING[25602]: chan_sip.c:3805 retrans_pkt: Hanging up call NjZjMmI2MWRlYmY0YWYwMGVhYTAyNmE0NzU4OWU5YTk. - no reply to our critical packet (see doc/sip-retransmit.txt). it seems that the signalling that pass through opensips does not work correctly... this is a part of my asterisk configuration: rtpstart=10001 rtpend=15000 externip = 77.238.xx.yy localnet=192.168.6.131/255.255.255.255 localnet=192.168.6.132/255.255.255.255 [ser_phones] type=friend context=from_inbound_ser host=192.168.6.130 insecure=very disallow=all allow=gsm opensips.cfg (relevant parts, not modules config.) route{ if (!mf_process_maxfwd_header(10)) { sl_send_reply(483,Too Many Hops); exit; } if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method(BYE)) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails } else if (is_method(INVITE)) { # even if in most of the cases is useless, do RR for # re-INVITEs alos, as some buggy clients do change route set # during the dialog. record_route(); } # route it out to whatever destination was set by loose_route() # in $du (destination URI). route(1); } else { if ( is_method(ACK) ) { if ( t_check_trans() ) { # non loose-route, but stateful ACK; must be an ACK after # a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction - # ignore and discard exit; } } sl_send_reply(404,Not here); } exit; } #initial requests # CANCEL processing if (is_method(CANCEL)) { if (t_check_trans()) t_relay(); exit; } t_check_trans(); # authenticate if from local subscriber if (!(method==REGISTER) is_from_local()) /*multidomain version*/ { if (!proxy_authorize(, subscriber)) { proxy_challenge(, 0); exit; } if (!db_check_from()) { sl_send_reply(403,Forbidden auth ID); exit; } consume_credentials(); # caller authenticated xlog([AUTH] PROXY for $fu ($si:$sp) OK); } # preloaded route checking if (loose_route()) { xlog(L_ERR, Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]); if (!is_method(ACK)) sl_send_reply(403,Preload Route denied); exit; } # record routing if (!is_method(REGISTER|MESSAGE)) record_route(); # account only INVITEs if (is_method(INVITE)) { setflag(1); # do accounting setflag(2); # for success or missed call xlog([SIP_INVITE] sip_from=$fu sip_to=$ru c_from=$fU
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
2010/10/6 Vallimamod ABDULLAH vallimamod.abdul...@imtelecom.fr: Hi Stefano, Hi, Make a sip trace on your asterisk box to see where the ACK is sent. Maybe you need to enable nat on asterisk to force it to send the ACK to the originating IP and not the IP of the contact field. Have a look at http://www.voip-info.org/wiki/view/Asterisk+sip+nat now I have nat=yes ; in the asterisk documentation I read that with nat=yes asterisk replies directly to the source IP address, ignoring SIP headers. So, now I assume this is wrong, because the source ip is opensips. But I can't understand if I must use no, never or route. thanks so much, -- Stefano Sasso http://stefano.dscnet.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to change Contact header
Solved! Adding a \r did the thing... if ( subst('/^Contact: sip:([0-9]+)@(.*)$/Contact: sip:\...@new_ip_address_here\r/ig') ) { xlog(contact modified!); }; On Tue, Oct 5, 2010 at 6:34 PM, David Santiago david.santi...@almiralabs.com wrote: Hi all, I need to modify the host part of a contact header. I'm trying something like: if ( subst('/^Contact: sip:([0-9]+)@(.*)$/Contact: sip:\...@new_ip_address_here/ig') ) { xlog(contact modified!); }; but the resulting Contact header is wrong and cannot be processed. Having a look at the header with wireshark shows that the Contact Binding entry is missing the ending , but the Contact, URI or SIP contact address have the at the end :L May be this is not the right way to modify a Contact header... Thanks in advance, David ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Source port in SIP replies
Hi! I ran into a pretty weird situation last day. I'm using opensips-1.6.2 as a load balancer for several * servers. Everything worked fine for months, but suddenly opensips started to use ports like 56827 or 51234 (does not matter, just non-default, not the one it is listening on). And the operator's system does not allow such replies, it just drops them. Opensips is listening on port 5070 on my system. Invite comes like: User Datagram Protocol, Src Port: sip (5060), Dst Port: vtsas (5070) INVITE sip:xx...@my.ip:5070;user=phone SIP/2.0 Reply goes like: User Datagram Protocol, Src Port: 52795 (52795), Dst Port: sip (5060) SIP/2.0 100 Giving a try Normally src port is always 5070. So, the questions are: - under what conditions does opensips decide to invent a new port? - can I control this? Thanks in advance, Alex ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
Actually, After reading back the logs: [Oct 6 10:29:54] WARNING[25602]: chan_sip.c:3805 retrans_pkt: Hanging up call NjZjMmI2MWRlYmY0YWYwMGVhYTAyNmE0NzU4OWU5YTk. - no reply to our critical packet (see doc/sip-retransmit.txt). It is asterisk that is not receiving the ACK so the issue is on your opensips config. Can you make a ngrep trace of an invite to see where is sent the final ACK from opensips ? More precisely, check if the UAC sends the ACK to Opensips' public IP and not the private one. Regards, - vma . On Oct 6, 2010, at 12:22 PM, Stefano Sasso wrote: 2010/10/6 Vallimamod ABDULLAH vallimamod.abdul...@imtelecom.fr: Hi Stefano, Hi, Make a sip trace on your asterisk box to see where the ACK is sent. Maybe you need to enable nat on asterisk to force it to send the ACK to the originating IP and not the IP of the contact field. Have a look at http://www.voip-info.org/wiki/view/Asterisk+sip+nat now I have nat=yes ; in the asterisk documentation I read that with nat=yes asterisk replies directly to the source IP address, ignoring SIP headers. So, now I assume this is wrong, because the source ip is opensips. But I can't understand if I must use no, never or route. thanks so much, -- Stefano Sasso http://stefano.dscnet.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to change Contact header
Hi David, take when using such regexps as the contact hdr may have multiple syntaxes: Contact: sip:u...@domain Contact: sip:u...@domain;hdr_params Contact: sip:u...@domain;hdr_params Contact: sip:u...@domain;uri_params;hdr_params Contact: display sip:u...@domain;hdr_params Contact: display sip:u...@domain;hdr_params etc So having a regexp to match all case may be difficultbetter try to focus only on the domain part, like matching the @IP part, like (Contact: .*@)[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} Regards, Bogdan David Santiago wrote: Solved! Adding a \r did the thing... if ( subst('/^Contact: sip:([0-9]+)@(.*)$/Contact: sip:\...@new_ip_address_here\r/ig') ) { xlog(contact modified!); }; On Tue, Oct 5, 2010 at 6:34 PM, David Santiago david.santi...@almiralabs.com mailto:david.santi...@almiralabs.com wrote: Hi all, I need to modify the host part of a contact header. I'm trying something like: if ( subst('/^Contact: sip:([0-9]+)@(.*)$/Contact: sip:\...@new_ip_address_here/ig') ) { xlog(contact modified!); }; but the resulting Contact header is wrong and cannot be processed. Having a look at the header with wireshark shows that the Contact Binding entry is missing the ending , but the Contact, URI or SIP contact address have the at the end :L May be this is not the right way to modify a Contact header... Thanks in advance, David ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] what is DROP_RATE means?...
Hi Pavel, Shows how many requests are dropped by the filters. Regards, Bogdan Pavel Eremin wrote: I include RATELIMIT module to my OpenSIPS installation and i have a question: What is DROP_RATE when i run rl_stat command... if DROP_RATE grows is it dangerous? -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] issue compiling opensips 1.6.3
Hi Stefano, What distro are you using ? See if it works by adding in modules/seas/ha.h after line 26 the following line: #include sys/time.h Regards, Bogdan Stefano Pisani wrote: Hello, When I tried to compile 1.6.3 I got this issue Compiling ha.c gcc -fPIC -DPIC -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -mtune=pentium4 -DMOD_NAME='seas'-DNAME='opensips' -DVERSION='1.6.3-notls' -DARCH='i386' -DOS='linux' -DCOMPILER='gcc 3.4.6' -D__CPU_i386 -D__OS_linux -D__SMP_yes -DCFG_DIR='/usr/local/etc/opensips/' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DSTATISTICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SIGIO_RT -DHAVE_SELECT -c ha.c -o ha.o In file included from ha.c:26: ha.h:29: error: field `sent' has incomplete type make[1]: *** [ha.o] Error 1 make[1]: Leaving directory `/root/opensips-1.6.3-notls/modules/seas' make: *** [modules] Error 2 Any advice to fix it? Thanks Stefano ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
2010/10/6 Vallimamod ABDULLAH vallimamod.abdul...@imtelecom.fr: It is asterisk that is not receiving the ACK so the issue is on your opensips config. Can you make a ngrep trace of an invite to see where is sent the final ACK from opensips ? More precisely, check if the UAC sends the ACK to Opensips' public IP and not the private one. you're right, with wireshark I saw the uac sends ack to the opensips private ip, 192.168.6.130. Can this be resolved using advertised_address in opensips? or there is other options? thanks -- Stefano Sasso http://stefano.dscnet.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Source port in SIP replies
Hi Alexandr, Alexandr A. Alexandrov wrote: Hi! I ran into a pretty weird situation last day. I'm using opensips-1.6.2 as a load balancer for several * servers. Everything worked fine for months, but suddenly opensips started to use ports like 56827 or 51234 (does not matter, just non-default, not the one it is listening on). And the operator's system does not allow such replies, it just drops them. Opensips is listening on port 5070 on my system. Invite comes like: User Datagram Protocol, Src Port: sip (5060), Dst Port: vtsas (5070) INVITE sip:xx...@my.ip:5070;user=phone SIP/2.0 Reply goes like: User Datagram Protocol, Src Port: 52795 (52795), Dst Port: sip (5060) SIP/2.0 100 Giving a try Normally src port is always 5070. So, the questions are: - under what conditions does opensips decide to invent a new port? under no conditions - it will use only the defined interfaces from cfg... Are you sure about that port changing ? could you provide a pcap showing this ? Regards, Bogdan -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
On Oct 6, 2010, at 1:25 PM, Stefano Sasso wrote: 2010/10/6 Vallimamod ABDULLAH vallimamod.abdul...@imtelecom.fr: It is asterisk that is not receiving the ACK so the issue is on your opensips config. Can you make a ngrep trace of an invite to see where is sent the final ACK from opensips ? More precisely, check if the UAC sends the ACK to Opensips' public IP and not the private one. you're right, with wireshark I saw the uac sends ack to the opensips private ip, 192.168.6.130. Can this be resolved using advertised_address in opensips? or there is other options? Then you should use record_route_preset with the public ip at the beginning of your script. Hope this will help ! Regards, - vma . ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
2010/10/6 Vallimamod ABDULLAH vallimamod.abdul...@imtelecom.fr: Can this be resolved using advertised_address in opensips? or there is other options? Then you should use record_route_preset with the public ip at the beginning of your script. thank you for the hint. I now have record_route_preset, and now the ACK from UAC is sent to the opensips public ip. but the problem persists, and it seems the ACK never reaches the asterisk server, that still have in logs the same sad message. maybe I should use record_route_preset not at the very beginning of the route section but instead of record_route()? bye, -- Stefano Sasso http://stefano.dscnet.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Source port in SIP replies
Hi Bogdan, Well, this confuses me even more... I though that in case opensips can not open socket on the port it listens on, it tries to open a socket on a port where it can, and then send the packet out... This would not break any standarts, AFAIK (even though firewalls might get crazy about this, which is, pitifully, my case). Regards, Alex 06.10.2010 15:26, Bogdan-Andrei Iancu: Hi Alexandr, Alexandr A. Alexandrov wrote: Hi! I ran into a pretty weird situation last day. I'm using opensips-1.6.2 as a load balancer for several * servers. Everything worked fine for months, but suddenly opensips started to use ports like 56827 or 51234 (does not matter, just non-default, not the one it is listening on). And the operator's system does not allow such replies, it just drops them. Opensips is listening on port 5070 on my system. Invite comes like: User Datagram Protocol, Src Port: sip (5060), Dst Port: vtsas (5070) INVITE sip:xx...@my.ip:5070;user=phone SIP/2.0 Reply goes like: User Datagram Protocol, Src Port: 52795 (52795), Dst Port: sip (5060) SIP/2.0 100 Giving a try Normally src port is always 5070. So, the questions are: - under what conditions does opensips decide to invent a new port? under no conditions - it will use only the defined interfaces from cfg... Are you sure about that port changing ? could you provide a pcap showing this ? Regards, Bogdan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
2010/10/6 Stefano Sasso stesa...@gmail.com: 2010/10/6 Vallimamod ABDULLAH vallimamod.abdul...@imtelecom.fr: Can this be resolved using advertised_address in opensips? or there is other options? Then you should use record_route_preset with the public ip at the beginning of your script. thank you for the hint. I now have record_route_preset, and now the ACK from UAC is sent to the opensips public ip. but the problem persists, and it seems the ACK never reaches the asterisk server, that still have in logs the same sad message. maybe I found the problem... I added the following line after if(has_totag()) { if(loose_route())... and before the route(1): xlog([LOOSE_ROUTE] from $si:$sp method $rm SET_DESTINATION $du); the $du should be the rewritten destination, changed by loose_route. in opensips log I found: Oct 6 14:24:35 TDCVIRX09 /usr/local/sbin/opensips[30869]: [LOOSE_ROUTE] from 94.33.32.xxx:55484 method ACK SET_DESTINATION sip:77.238.yy.zz:5060;lr;ftag=1a4ab330;did=ed.36ed132 (where 77.238 is the public ip of opensips), so it seems that opensips tries to redirect the ACK to itself (a loop?) how can I avoid this? thanks -- Stefano Sasso http://stefano.dscnet.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
On Oct 6, 2010, at 2:06 PM, Stefano Sasso wrote: 2010/10/6 Vallimamod ABDULLAH vallimamod.abdul...@imtelecom.fr: Can this be resolved using advertised_address in opensips? or there is other options? Then you should use record_route_preset with the public ip at the beginning of your script. thank you for the hint. I now have record_route_preset, and now the ACK from UAC is sent to the opensips public ip. but the problem persists, and it seems the ACK never reaches the asterisk server, that still have in logs the same sad message. maybe I should use record_route_preset not at the very beginning of the route section but instead of record_route()? You are right: you should not mix record_route_preset() and record_route(). Try to replace record_route with record_route preset. And if it does not work, make a ngrep capture on your opensips server to see sip dialog between opensips and asterisk (command line: ngrep -qt -d ethX -W byline port 5060.) Btw, I encourage you to use a public ip on your server if you have the possibility: putting opensips behind nat is *bad* as everybody will tell you ;-) - vma . ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
2010/10/6 Vallimamod ABDULLAH vallimamod.abdul...@imtelecom.fr: You are right: you should not mix record_route_preset() and record_route(). ok Try to replace record_route with record_route preset. And if it does not work, make a ngrep capture on your opensips server to see sip dialog between opensips and asterisk (command line: ngrep -qt -d ethX -W byline port 5060.) it doesn't work :( the ACK loops in the opensips, never reaching asterisk. here a part of ngrep output U 2010/10/06 14:43:42.733498 94.33.32.xx:55484 - 192.168.6.130:5060 ACK sip:1...@77.238.yy.zz:5060 SIP/2.0. Via: SIP/2.0/UDP 94.33.32.xx:55484;branch=z9hG4bK-d8754z-605d4c7aa5492b3c-1---d8754z-;rport. Max-Forwards: 70. Route: sip:77.238.yy.zz:5060;lr;ftag=931ba062;did=12c.0478d917. Contact: sip:4...@94.33.32.xx:55484. To: 101sip:1...@voip.mydomain.it;tag=as06487c1d. From: 4002sip:4...@voip.mydomain.it;tag=931ba062. Call-ID: YjZhZTkxYjhiOTA2NjE4NTMzZDk4ZWI1YWM5NmI0M2Y.. CSeq: 2 ACK. U 2010/10/06 14:43:42.736777 192.168.6.130:5060 - 77.238.yy.zz:5060 ACK sip:77.238.yy.zz:5060;lr;ftag=931ba062;did=12c.0478d917 SIP/2.0. Via: SIP/2.0/UDP 192.168.6.130;branch=z9hG4bK55cc.c8f0d087.2. Via: SIP/2.0/UDP 94.33.32.xx:55484;received=94.33.32.xx;branch=z9hG4bK-d8754z-605d4c7aa5492b3c-1---d8754z-;rport=55484. Max-Forwards: 69. Contact: sip:4...@94.33.32.xx:55484. To: 101sip:1...@voip.mydomain.it;tag=as06487c1d. From: 4002sip:4...@voip.mydomain.it;tag=931ba062. Call-ID: YjZhZTkxYjhiOTA2NjE4NTMzZDk4ZWI1YWM5NmI0M2Y.. CSeq: 2 ACK. U 2010/10/06 14:43:42.737441 192.168.6.130:5060 - 192.168.6.130:5060 ACK sip:77.238.yy.zz:5060;lr;ftag=931ba062;did=12c.0478d917 SIP/2.0. Via: SIP/2.0/UDP 192.168.6.130;branch=z9hG4bK55cc.c8f0d087.2. Via: SIP/2.0/UDP 94.33.32.xx:55484;received=94.33.32.xx;branch=z9hG4bK-d8754z-605d4c7aa5492b3c-1---d8754z-;rport=55484. Max-Forwards: 69. Contact: sip:4...@94.33.32.xx:55484. To: 101sip:1...@voip.mydomain.it;tag=as06487c1d. From: 4002sip:4...@voip.mydomain.it;tag=931ba062. Call-ID: YjZhZTkxYjhiOTA2NjE4NTMzZDk4ZWI1YWM5NmI0M2Y.. CSeq: 2 ACK. Btw, I encourage you to use a public ip on your server if you have the possibility: putting opensips behind nat is *bad* as everybody will tell you ;-) unfortunately I can't. the customer would not use more than one ip address, and the servers are behind a firewall that do DNAT. (all public ip are on external if) thanks -- Stefano Sasso http://stefano.dscnet.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] OpenSIPS swallows BYEs
Hi all, I have a running OpenSIPS installation that I'm using for testing purposes. The fact is that I'm forwarding requests from a voip provider to a jain slee server and everything is working fine (INVITEs, ACKs, RTP flow,...), except for the BYEs generated from the server side. They reach the OpenSIPs proxy and are not forwarded to the voip provider in order to finish the call. I'm not sure if I have to manually setup a route for this to happen, or if this behaviour is only available by using the B2BUA approach in OpenSIPS. Thanks a lot! David ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
On 06.10.2010 15:30, Vallimamod ABDULLAH wrote: You are right: you should not mix record_route_preset() and record_route(). Try to replace record_route with record_route preset. And if it does not work, make a ngrep capture on your opensips server to see sip dialog between opensips and asterisk (command line: ngrep -qt -d ethX -W byline port 5060.) Btw, I encourage you to use a public ip on your server if you have the possibility: putting opensips behind nat is*bad* as everybody will tell you;-) Right, Stefano: make sure you have not added the opensips IP addresses or domain names already listed in alias core parameter to the domain table. If the address in RURI is considered local it does routing after strict. The RURI gets rewritten with the URI in the Route header and like in your case opensips relayes ACK to itself. -- Sincerely, Andrew Pogrebennyk ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to change Contact header
David, Also if rewriting Contact with the opensips address is what you want to achieve, you should look no further than b2b_logic top hiding scenario: http://www.opensips.org/Resources/B2buaTutorial16#toc12 On 06.10.2010 14:15, Bogdan-Andrei Iancu wrote: Hi David, take when using such regexps as the contact hdr may have multiple syntaxes: Contact: sip:u...@domain Contact: sip:u...@domain;hdr_params Contact:sip:u...@domain;hdr_params Contact:sip:u...@domain;uri_params;hdr_params Contact: displaysip:u...@domain;hdr_params Contact: displaysip:u...@domain;hdr_params etc So having a regexp to match all case may be difficultbetter try to focus only on the domain part, like matching the @IP part, like (Contact: .*@)[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} Regards, Bogdan David Santiago wrote: Solved! Adding a \r did the thing... if ( subst('/^Contact:sip:([0-9]+)@(.*)$/Contact: sip:\...@new_ip_address_here\r/ig') ) { xlog(contact modified!); }; On Tue, Oct 5, 2010 at 6:34 PM, David Santiago david.santi...@almiralabs.commailto:david.santi...@almiralabs.com wrote: Hi all, I need to modify the host part of a contact header. I'm trying something like: if ( subst('/^Contact:sip:([0-9]+)@(.*)$/Contact: sip:\...@new_ip_address_here/ig') ) { xlog(contact modified!); }; but the resulting Contact header is wrong and cannot be processed. Having a look at the header with wireshark shows that the Contact Binding entry is missing the ending , but the Contact, URI or SIP contact address have the at the end :L May be this is not the right way to modify a Contact header... Thanks in advance, David -- Sincerely, Andrew Pogrebennyk ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] OpenSIPS swallows BYEs
David, If you rewrite Contact header with OpenSIPS address it is expected that BYE won't go any further than OpenSIPs proxy. You should use the B2B top hiding scenario as I suggested in other email. On 06.10.2010 15:50, David Santiago wrote: Hi all, I have a running OpenSIPS installation that I'm using for testing purposes. The fact is that I'm forwarding requests from a voip provider to a jain slee server and everything is working fine (INVITEs, ACKs, RTP flow,...), except for the BYEs generated from the server side. They reach the OpenSIPs proxy and are not forwarded to the voip provider in order to finish the call. I'm not sure if I have to manually setup a route for this to happen, or if this behaviour is only available by using the B2BUA approach in OpenSIPS. Thanks a lot! David -- Sincerely, Andrew Pogrebennyk ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to change Contact header
Fair enough, I'll check it. Thx Andrew! On Wed, Oct 6, 2010 at 2:58 PM, Andrew Pogrebennyk andrew.pogreben...@portaone.com wrote: David, Also if rewriting Contact with the opensips address is what you want to achieve, you should look no further than b2b_logic top hiding scenario: http://www.opensips.org/Resources/B2buaTutorial16#toc12 On 06.10.2010 14:15, Bogdan-Andrei Iancu wrote: Hi David, take when using such regexps as the contact hdr may have multiple syntaxes: Contact: sip:u...@domain Contact: sip:u...@domain;hdr_params Contact:sip:u...@domain;hdr_params Contact:sip:u...@domain;uri_params;hdr_params Contact: displaysip:u...@domain;hdr_params Contact: displaysip:u...@domain;hdr_params etc So having a regexp to match all case may be difficultbetter try to focus only on the domain part, like matching the @IP part, like (Contact: .*@)[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} Regards, Bogdan David Santiago wrote: Solved! Adding a \r did the thing... if ( subst('/^Contact:sip:([0-9]+)@(.*)$/Contact: sip:\...@new_ip_address_here\r/ig') ) { xlog(contact modified!); }; On Tue, Oct 5, 2010 at 6:34 PM, David Santiago david.santi...@almiralabs.commailto:david.santi...@almiralabs.com wrote: Hi all, I need to modify the host part of a contact header. I'm trying something like: if ( subst('/^Contact:sip:([0-9]+)@(.*)$/Contact: sip:\...@new_ip_address_here/ig') ) { xlog(contact modified!); }; but the resulting Contact header is wrong and cannot be processed. Having a look at the header with wireshark shows that the Contact Binding entry is missing the ending , but the Contact, URI or SIP contact address have the at the end :L May be this is not the right way to modify a Contact header... Thanks in advance, David -- Sincerely, Andrew Pogrebennyk ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
2010/10/6 Andrew Pogrebennyk andrew.pogreben...@portaone.com: Right, Stefano: make sure you have not added the opensips IP addresses or domain names already listed in alias core parameter to the domain table. If the address in RURI is considered local it does routing after strict. The RURI gets rewritten with the URI in the Route header and like in your case opensips relayes ACK to itself. Hi Andrew, thank you for the reply. I'm a new opensips user, how can I check what you said? The domain and ip address of opensips server is listed in domains table, but I don't know how to see if it's in aliases. In opensips.cfg I don't have anything pointing to aliases except modparam(alias_db|auth_db|usrloc|uri_db, use_domain, 1) thanks -- Stefano Sasso http://stefano.dscnet.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
Stefan, Please try removing ip addr and domain of opensips from domains table. It is sufficient to have listen=ip and alias=domain lines in config. Domain module will learn the ip and domain from config automatically. On 06.10.2010 16:02, Stefano Sasso wrote: Hi Andrew, thank you for the reply. I'm a new opensips user, how can I check what you said? The domain and ip address of opensips server is listed in domains table, but I don't know how to see if it's in aliases. In opensips.cfg I don't have anything pointing to aliases except modparam(alias_db|auth_db|usrloc|uri_db, use_domain, 1) thanks -- Sincerely, Andrew Pogrebennyk ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
2010/10/6 Andrew Pogrebennyk andrew.pogreben...@portaone.com: Stefan, Please try removing ip addr and domain of opensips from domains table. It is sufficient to have listen=ip and alias=domain lines in config. Domain module will learn the ip and domain from config automatically. nothing happened. It still loops (ACKs and BYEs) thanks, s -- Stefano Sasso http://stefano.dscnet.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
On 06.10.2010 16:36, Stefano Sasso wrote: nothing happened. It still loops (ACKs and BYEs) Hm, I will have to check in detail what you wrote here. This ACK should reach the asterisk: U 2010/10/06 14:43:42.736777 192.168.6.130:5060 - 77.238.yy.zz:5060 ACK sip:77.238.yy.zz:5060;lr;ftag=931ba062;did=12c.0478d917 SIP/2.0. ... but then there is another ACK to itself. Are you doing NAT 77.238.yy.zz to 192.168.6.130 (opensips itself)? How do you reach the asterisk? I think it should have a mapped routable IP address to. About the correctness of your config, you may remove the record_route() from loose_route block which is marked with even if in most of the cases is useless.. comment. You only need this: # record routing if (!is_method(REGISTER|MESSAGE)) record_route_preset(77.238.xx.yy:5060); IP should be the same as in advertised_address setting. Also add force_rport() at the very top of the main route. Note 1: you do need the advertised_address setting. Note 2: after removing IPs from domain table you may need to replace if (!is_uri_host_local()) .. with equivalent check: if(!uri==myself) for outbound routing. At least it worked for me. Anyway the main question is how do you reach the asterisk. -- Sincerely, Andrew Pogrebennyk ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] OpenSIPS swallows BYEs
Hi David, Is the BYE replied or forwarded to whatever destination ? probably your record routing is somehow broken. OpenSIPS may misroute the BYE because the invalid route set - posting the 200 OK for INVITE and the BYE will help in investigating this. Regards, Bogdan David Santiago wrote: Hi all, I have a running OpenSIPS installation that I'm using for testing purposes. The fact is that I'm forwarding requests from a voip provider to a jain slee server and everything is working fine (INVITEs, ACKs, RTP flow,...), except for the BYEs generated from the server side. They reach the OpenSIPs proxy and are not forwarded to the voip provider in order to finish the call. I'm not sure if I have to manually setup a route for this to happen, or if this behaviour is only available by using the B2BUA approach in OpenSIPS. Thanks a lot! David ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Source port in SIP replies
Hi Alexandr, Alexandr A. Alexandrov wrote: Hi Bogdan, Well, this confuses me even more... I though that in case opensips can not open socket on the port it listens on, it tries to open a socket on a port where it can, and then send the packet out... all the local ports are open at startup time - there is no local socket created at runtime (for UDP). I'm really sure that opensips is not messing with the ports, this is why I was asking for the pcapjust to check what happens at network level. Regards, Bogdan This would not break any standarts, AFAIK (even though firewalls might get crazy about this, which is, pitifully, my case). Regards, Alex 06.10.2010 15:26, Bogdan-Andrei Iancu: Hi Alexandr, Alexandr A. Alexandrov wrote: Hi! I ran into a pretty weird situation last day. I'm using opensips-1.6.2 as a load balancer for several * servers. Everything worked fine for months, but suddenly opensips started to use ports like 56827 or 51234 (does not matter, just non-default, not the one it is listening on). And the operator's system does not allow such replies, it just drops them. Opensips is listening on port 5070 on my system. Invite comes like: User Datagram Protocol, Src Port: sip (5060), Dst Port: vtsas (5070) INVITE sip:xx...@my.ip:5070;user=phone SIP/2.0 Reply goes like: User Datagram Protocol, Src Port: 52795 (52795), Dst Port: sip (5060) SIP/2.0 100 Giving a try Normally src port is always 5070. So, the questions are: - under what conditions does opensips decide to invent a new port? under no conditions - it will use only the defined interfaces from cfg... Are you sure about that port changing ? could you provide a pcap showing this ? Regards, Bogdan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
2010/10/6 Andrew Pogrebennyk andrew.pogreben...@portaone.com: This ACK should reach the asterisk: U 2010/10/06 14:43:42.736777 192.168.6.130:5060 - 77.238.yy.zz:5060 ACK sip:77.238.yy.zz:5060;lr;ftag=931ba062;did=12c.0478d917 SIP/2.0. ... but then there is another ACK to itself. Are you doing NAT 77.238.yy.zz to 192.168.6.130 (opensips itself)? yes. 77.238.yy.zz is dnattet to 192.168.6.130 in load_balancer table I have the asterisk boxes as 192.168.6.131 and 192.168.6.132 How do you reach the asterisk? I think it should have a mapped routable IP address to. So I can resolve dnatting i.e. port 5061 to .131 and 5062 to .132 and having in load_balancer 77.238.xx.yy:5061 and 77.238.xx.yy:5062? Am I right? About the correctness of your config, you may remove the record_route() from loose_route block which is marked with even if in most of the cases is useless.. comment. You only need this: # record routing if (!is_method(REGISTER|MESSAGE)) record_route_preset(77.238.xx.yy:5060); IP should be the same as in advertised_address setting. Also add force_rport() at the very top of the main route. done Note 1: you do need the advertised_address setting. ok Note 2: after removing IPs from domain table you may need to replace if (!is_uri_host_local()) .. with equivalent check: if(!uri==myself) for outbound routing. At least it worked for me. yes, i changed like this. Anyway the main question is how do you reach the asterisk. via their internal ip addresses. thanks so much -- Stefano Sasso http://stefano.dscnet.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
On 06.10.2010 17:25, Stefano Sasso wrote: So I can resolve dnatting i.e. port 5061 to .131 and 5062 to .132 and having in load_balancer 77.238.xx.yy:5061 and 77.238.xx.yy:5062? Am I right? Yes, this should help. It seems that asterisk will append bindport to externip automatically now so correct IP will be advertised in Contact header: https://issues.asterisk.org/view.php?id=11858 So give it a try. -- Sincerely, Andrew Pogrebennyk ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] OpenSIPS swallows BYEs
Bogdan, right now it's being forwarded again to the slee server who sent it, as I'm basically using the configuration provided in http://www.opensips.org/html/docs/modules/1.6.x/dispatcher.html On Wed, Oct 6, 2010 at 4:16 PM, Bogdan-Andrei Iancu bog...@voice-system.rowrote: Hi David, Is the BYE replied or forwarded to whatever destination ? probably your record routing is somehow broken. OpenSIPS may misroute the BYE because the invalid route set - posting the 200 OK for INVITE and the BYE will help in investigating this. Regards, Bogdan David Santiago wrote: Hi all, I have a running OpenSIPS installation that I'm using for testing purposes. The fact is that I'm forwarding requests from a voip provider to a jain slee server and everything is working fine (INVITEs, ACKs, RTP flow,...), except for the BYEs generated from the server side. They reach the OpenSIPs proxy and are not forwarded to the voip provider in order to finish the call. I'm not sure if I have to manually setup a route for this to happen, or if this behaviour is only available by using the B2BUA approach in OpenSIPS. Thanks a lot! David ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+asterisk: signalling not working?
2010/10/6 Andrew Pogrebennyk andrew.pogreben...@portaone.com: On 06.10.2010 17:25, Stefano Sasso wrote: So I can resolve dnatting i.e. port 5061 to .131 and 5062 to .132 and having in load_balancer 77.238.xx.yy:5061 and 77.238.xx.yy:5062? Am I right? Yes, this should help. It seems that asterisk will append bindport to externip automatically now so correct IP will be advertised in Contact header: https://issues.asterisk.org/view.php?id=11858 So give it a try. Ok, I'll tell the firewall man to nat the ports. Unfortunately the firewall isn't under my control. thanks again, s -- Stefano Sasso http://stefano.dscnet.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Source port in SIP replies
Hi, Bogdan! I sent pcap to your address directly, in order not to disclose real ip addresses and to throw files to the list. I tried to study the code, and yes, it appears that it can not change the port freely... The strnage thing is, that this problem appeared suddenly, and then suddenly disappeared - without my interaction. Unfortunately, only the capture that I sent exists. I noticed that the src port is different only when the problem already went away. Looks like some kernel/system flaw... iptables do not change packets - there is only an ACCEPT input chain for the operator's address... Weird... -- Regards, Alex 2010/10/6 Bogdan-Andrei Iancu bog...@voice-system.ro Hi Alexandr, Alexandr A. Alexandrov wrote: Hi Bogdan, Well, this confuses me even more... I though that in case opensips can not open socket on the port it listens on, it tries to open a socket on a port where it can, and then send the packet out... all the local ports are open at startup time - there is no local socket created at runtime (for UDP). I'm really sure that opensips is not messing with the ports, this is why I was asking for the pcapjust to check what happens at network level. Regards, Bogdan This would not break any standarts, AFAIK (even though firewalls might get crazy about this, which is, pitifully, my case). Regards, Alex 06.10.2010 15:26, Bogdan-Andrei Iancu: Hi Alexandr, Alexandr A. Alexandrov wrote: Hi! I ran into a pretty weird situation last day. I'm using opensips-1.6.2 as a load balancer for several * servers. Everything worked fine for months, but suddenly opensips started to use ports like 56827 or 51234 (does not matter, just non-default, not the one it is listening on). And the operator's system does not allow such replies, it just drops them. Opensips is listening on port 5070 on my system. Invite comes like: User Datagram Protocol, Src Port: sip (5060), Dst Port: vtsas (5070) INVITE sip:xx...@my.ip:5070;user=phone SIP/2.0 Reply goes like: User Datagram Protocol, Src Port: 52795 (52795), Dst Port: sip (5060) SIP/2.0 100 Giving a try Normally src port is always 5070. So, the questions are: - under what conditions does opensips decide to invent a new port? under no conditions - it will use only the defined interfaces from cfg... Are you sure about that port changing ? could you provide a pcap showing this ? Regards, Bogdan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- С уважением, ААА. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Serialforking failure, with lcr:parse_phostport: too many colons in udp:: 0
Hi Taisto, could you test the rev 7248 on trunk for solution 2) ? if ok, I will backport to 1.6 Regards, Bogdan Taisto Qvist (WM) wrote: Hi again, and thanks for your reply! Personally I think alternative 2 feels best. It's similar to how other functions use the returncode for status indications. But either solution works for me, even though the first solution is more specific for my requirement, and i suppose that the more generic the solution the better. Regards Taisto On Tue, 05 Oct 2010 11:53:40 +0300, Bogdan-Andrei Iancu bog...@voice-system.ro wrote: Hi Taisto, Concerning the timer issue, I know about the avp-concept, and with your solution below, I can figure out how to change the timer when serial forking starts. But what I also wanted, was to make sure that the last branch in the fork was given a normal timer C. In other words, as long as there are available branches, I will rollOver to the next branch fairly quickly, but once i start the last branch, normal timer C would apply. (in other words, what the fr_inv_timer_next did in lcr) So I would need, I think, to figure out in a failure_route(), that the branches I am starting with next_branches() are the last ones. But how can I know that? I cant find a way to count remaining branches? I see, I was not aware of this functionality of lcr functions. This can be fixed in several ways: 1) next_branches() get a new extra optional param - the rollover timeout - it will be set only if other branches are still available. If not, the default timeout can be used 2) next_branches() can return (1) if a next branch was set and other branches are available and (2) if a next branch was set and NO other branches are available; and you can do from script all your timeout logic. 3) add a new function still_has_branches() to use after next_branches(). Which approach you think is the simplest to use and also flexible enough to cover all cases ? Regards, Bogdan Btw, my hack was never intended as a real fix. I was just grasping at straws during troubleshooting. Also, it didnt solve the scenario of when there is only ONE contact in the target set. Then it fails again since there are no branches, just a req-uri. Thanks again, Taisto Qvist Bogdan-Andrei Iancu skrev 2010-09-29 09:45: Hi Taisto, These new functions do replicate the behaviour of the old lcr functions..the idea was to make this serialize mechanism globally available for all modules. Now, if all contacts have the same Q, there is nothing to serialize.Probably it will be more logical to return false to script in such a case (if no serialization was done)But you can do something like: -- lookup(location, m); switch ($retcode) { case 1: log(2, (lab2) - Contact found in location server, rerouting.\n); if ( serialize_branches(0) next_branches()) { log(1, (lab2) - serial forking in progress\n); setflag(NN); # remember to resume serial forking in failure route } xlog(sending to RURI=$ru ; branches=$(branch(uri)[*])\n); return(1); --- Regarding the timer stuff, see my prev email. Regards, Bogdan Taisto Qvist wrote: It seems like I cried yay to soon. Serialforking does work even though I cant figure out(trying the rtfm-concept) how I can reduce the timer C for only the serial-forking scenario, which I was capable of doing with the lcr modulebut now Parallell forking doesnt work anymore :-( I changed my script to: -- lookup(location, m); switch ($retcode) { case 1: log(2, (lab2) - Contact found in location server, rerouting.\n); if (!serialize_branches(0)) { log(1, (lab2) - Unable to load contacts for serial forking\n); t_reply(500, Server Internal Error (Serial fork)); exit; } if ( !next_branches() ) { t_reply(509, Serial fork error); exit; } return(1); --- But when my to UA's register with the SAME q-value, I get failure in next_branches(). --- Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: (lab2) - Its a valid local user Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: DBG:core:comp_scriptvar: int 20 : 0 / 0 Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: (lab2) - Stateful LS lookup() Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: DBG:registrar:lookup: setting as ruri sip:j...@10.10.2.33:5060 Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]: DBG:registrar:lookup: looking for branches Sep 28 20:41:54 sip-laptop2 opensips_lab2[2586]:
[OpenSIPS-Users] Initialization error for b2b test
Hello, I'm trying to test the top hiding scenario but I get the following error at opensips startup: ... Oct 6 18:03:49 ip-10-122-54-163 opensips: DBG:core:find_cmd_export_t: b2b_init_request not found Oct 6 18:03:49 ip-10-122-54-163 opensips: DBG:core:find_cmd_export_t: b2b_init_request not found Oct 6 18:03:49 ip-10-122-54-163 opensips: CRITICAL:core:yyerror: parse error in config file, line 247, column 22-23: unknown command b2b_init_request, missing loadmodule? ... line 247 is this: b2b_init_request(top hiding); and the list of modules I have declared is: #loadmodule db_mysql.so loadmodule signaling.so loadmodule sl.so loadmodule tm.so loadmodule rr.so loadmodule maxfwd.so loadmodule usrloc.so loadmodule registrar.so loadmodule textops.so loadmodule mi_fifo.so loadmodule uri.so loadmodule acc.so /* uncomment next lines for MySQL based authentication support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule auth.so #loadmodule auth_db.so /* uncomment next line for aliases support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule alias_db.so /* uncomment next line for multi-domain support NOTE: a DB (like db_mysql) module must be also loaded NOTE: be sure and enable multi-domain support in all used modules (see multi-module params section ) */ #loadmodule domain.so /* uncomment the next two lines for presence server support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule presence.so #loadmodule presence_xml.so loadmodule dispatcher.so Do not see which module I'm missing :L Regards ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Initialization error for b2b test
You need to load both b2b_entities and b2b_logic: http://www.opensips.org/html/docs/modules/1.6.x/b2b_logic.html#id228233 Regards, Ovidiu Sas On Wed, Oct 6, 2010 at 12:10 PM, David Santiago david.santi...@almiralabs.com wrote: Hello, I'm trying to test the top hiding scenario but I get the following error at opensips startup: ... Oct 6 18:03:49 ip-10-122-54-163 opensips: DBG:core:find_cmd_export_t: b2b_init_request not found Oct 6 18:03:49 ip-10-122-54-163 opensips: DBG:core:find_cmd_export_t: b2b_init_request not found Oct 6 18:03:49 ip-10-122-54-163 opensips: CRITICAL:core:yyerror: parse error in config file, line 247, column 22-23: unknown command b2b_init_request, missing loadmodule? ... line 247 is this: b2b_init_request(top hiding); and the list of modules I have declared is: #loadmodule db_mysql.so loadmodule signaling.so loadmodule sl.so loadmodule tm.so loadmodule rr.so loadmodule maxfwd.so loadmodule usrloc.so loadmodule registrar.so loadmodule textops.so loadmodule mi_fifo.so loadmodule uri.so loadmodule acc.so /* uncomment next lines for MySQL based authentication support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule auth.so #loadmodule auth_db.so /* uncomment next line for aliases support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule alias_db.so /* uncomment next line for multi-domain support NOTE: a DB (like db_mysql) module must be also loaded NOTE: be sure and enable multi-domain support in all used modules (see multi-module params section ) */ #loadmodule domain.so /* uncomment the next two lines for presence server support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule presence.so #loadmodule presence_xml.so loadmodule dispatcher.so Do not see which module I'm missing :L Regards ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Initialization error for b2b test
In fact I was doing it... I did not copy the whole loading block well in the email. There it is: #set module path mpath=/opt/opensipsnotls/lib/opensips/modules/ /* uncomment next line for MySQL DB support */ #loadmodule db_mysql.so loadmodule signaling.so loadmodule sl.so loadmodule tm.so loadmodule rr.so loadmodule maxfwd.so loadmodule usrloc.so loadmodule registrar.so loadmodule textops.so loadmodule mi_fifo.so loadmodule uri.so loadmodule acc.so /* uncomment next lines for MySQL based authentication support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule auth.so #loadmodule auth_db.so /* uncomment next line for aliases support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule alias_db.so /* uncomment next line for multi-domain support NOTE: a DB (like db_mysql) module must be also loaded NOTE: be sure and enable multi-domain support in all used modules (see multi-module params section ) */ #loadmodule domain.so /* uncomment the next two lines for presence server support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule presence.so #loadmodule presence_xml.so loadmodule dispatcher.so loadmodule b2b_entities.so loadmodule b2b_logic.so :((( On Wed, Oct 6, 2010 at 6:16 PM, Ovidiu Sas o...@voipembedded.com wrote: You need to load both b2b_entities and b2b_logic: http://www.opensips.org/html/docs/modules/1.6.x/b2b_logic.html#id228233 Regards, Ovidiu Sas On Wed, Oct 6, 2010 at 12:10 PM, David Santiago david.santi...@almiralabs.com wrote: Hello, I'm trying to test the top hiding scenario but I get the following error at opensips startup: ... Oct 6 18:03:49 ip-10-122-54-163 opensips: DBG:core:find_cmd_export_t: b2b_init_request not found Oct 6 18:03:49 ip-10-122-54-163 opensips: DBG:core:find_cmd_export_t: b2b_init_request not found Oct 6 18:03:49 ip-10-122-54-163 opensips: CRITICAL:core:yyerror: parse error in config file, line 247, column 22-23: unknown command b2b_init_request, missing loadmodule? ... line 247 is this: b2b_init_request(top hiding); and the list of modules I have declared is: #loadmodule db_mysql.so loadmodule signaling.so loadmodule sl.so loadmodule tm.so loadmodule rr.so loadmodule maxfwd.so loadmodule usrloc.so loadmodule registrar.so loadmodule textops.so loadmodule mi_fifo.so loadmodule uri.so loadmodule acc.so /* uncomment next lines for MySQL based authentication support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule auth.so #loadmodule auth_db.so /* uncomment next line for aliases support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule alias_db.so /* uncomment next line for multi-domain support NOTE: a DB (like db_mysql) module must be also loaded NOTE: be sure and enable multi-domain support in all used modules (see multi-module params section ) */ #loadmodule domain.so /* uncomment the next two lines for presence server support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule presence.so #loadmodule presence_xml.so loadmodule dispatcher.so Do not see which module I'm missing :L Regards ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Initialization error for b2b test
See the configiration file example here- http://www.opensips.org/Resources/B2bConfigExample -- Anca Vamanu www.voice-system.ro On 10/06/2010 07:10 PM, David Santiago wrote: Hello, I'm trying to test the top hiding scenario but I get the following error at opensips startup: ... Oct 6 18:03:49 ip-10-122-54-163 opensips: DBG:core:find_cmd_export_t: b2b_init_request not found Oct 6 18:03:49 ip-10-122-54-163 opensips: DBG:core:find_cmd_export_t: b2b_init_request not found Oct 6 18:03:49 ip-10-122-54-163 opensips: CRITICAL:core:yyerror: parse error in config file, line 247, column 22-23: unknown command b2b_init_request, missing loadmodule? ... line 247 is this: b2b_init_request(top hiding); and the list of modules I have declared is: #loadmodule db_mysql.so loadmodule signaling.so loadmodule sl.so loadmodule tm.so loadmodule rr.so loadmodule maxfwd.so loadmodule usrloc.so loadmodule registrar.so loadmodule textops.so loadmodule mi_fifo.so loadmodule uri.so loadmodule acc.so /* uncomment next lines for MySQL based authentication support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule auth.so #loadmodule auth_db.so /* uncomment next line for aliases support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule alias_db.so /* uncomment next line for multi-domain support NOTE: a DB (like db_mysql) module must be also loaded NOTE: be sure and enable multi-domain support in all used modules (see multi-module params section ) */ #loadmodule domain.so /* uncomment the next two lines for presence server support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule presence.so #loadmodule presence_xml.so loadmodule dispatcher.so Do not see which module I'm missing :L Regards ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] stuck dialogs on proxy thru b2bua
I've setup several OpenSIPS proxies (keeping track of dialogs,acc,etc.) behind a OpenSIPS B2BUA (to implement topology hiding - nothing else). I'm currently using version 1.6.3 on both the proxy b2bua. I updated the b2bua modules from svn yesterday. Certain dialogs hang because of how the B2BUA handles an inappropriate response to an INVITE in a never-established (canceled) dialog coupled with the proxy establishing a dialog after a CANCEL has been processed. After the initial call attempt is canceled, the upstream carrier responds with a 200 OK to the INVITE. The B2BUA sends that back to the OpenSIPS proxy. The OpenSIPS proxy creates a dialog even though the INVITE has been canceled. Soon afterwards, a BYE is received from upstream but the B2BUA does not send that back to the proxy. As a result, the dialog hangs (until the timeout is reached). I've tried to show the call flow below: proxy b2bua carrier - INV - 100 -- -- INV - 100 - - 183 - 183 -- --- CANCEL - 200(cancel)-- --- CANCEL - 200(cancel)-- - 200(invite)-- - 200(invite)-- - 200(invite)-- - 200(invite)-- - 200(invite)-- - 200(invite)-- - 200(invite)-- - 200(invite)-- - 200(invite)-- - 200(invite)-- - 200(invite)-- - 200(invite)-- - BYE - - 200(invite)-- - BYE - - 200(invite)-- I'm hoping I'm doing something stupid in my implementation that could cause this behavior. Thanks for any help that might resolve this issue. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Strange BLF behaviour on double call
Hello List, I am using opensips 1.6.3 from svn with presence and pua_dialoginfo modules to supervise line status. I am facing a strange issue in the following scenario with 2 phones A and B with B monitoring A with a BLF key: - phone A is on call, the corresponding BLF key is red on B's phone. - A new call comes in for A. Here the BLF key blinks to indicate phone ringing. - A does not take the call wich goes to voicemail. But then, the BLF key goes back to idle instead of red even if A is still on call. I have checked the notifications going to phone B and it appears that when the second call arrives, phone B is receiving notifications with states trying, early, terminated. So the issue is with the last state notification: it shoud be 'confirmed' instead of 'terminated' if phone A is still on call. Is there a way to force this in the config script ? Or is this an issue with the pua_dialoginfo module ? Thank you ! vma . ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users