Re: [OpenSIPS-Users] variable counter parameter to diversion Header
Hi, I have coded with while for treat all diversion headers. Ex: /while ($var(i) $(hdrcnt(Diversion)))// //{// //if(!$(hdr(Diversion)[$var(i)]{param.value,counter}{s.int}) || !$(hdr(Diversion)[$var(i)]{param.value,privacy}) || !$(hdr(Diversion)[$var(i)]{param.value,reason}))// //{// /// after all these treatments, I can not replace the good diversion header, if I have multiple diversion. Ex: If I have: /Diversion: sip:**@hexanet.fr; reason=user-busy; privacy=full ;counter=3// //Diversion: sip:**@hexanet.fr; reason=user-busy; privacy=off/ and if I use: remove_hf(Diversion), to rewrite the second diversion header. Opensips delete the first diversion header. How can I rewrite the good diversion header, here the second ? thanks Le 02/05/2013 19:21, Saúl Ibarra Corretgé a écrit : On May 2, 2013, at 4:20 PM, Mickael HUBERT wrote: Thank you very much, it's perfect ;) but, if I have many Diversion header in the same INVITE ? This command works ? You can index the call to hdr(Diversion), IIRC there is an example in the transformations page showing how to iterate through a list of headers with the same name. -- Saúl Ibarra Corretgé AG Projects ___ 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] variable counter parameter to diversion Header
some details: remove_hf delete all Diversion header, how can I delete or rewrite good header ? Le 03/05/2013 10:48, Mickael HUBERT a écrit : Hi, I have coded with while for treat all diversion headers. Ex: /while ($var(i) $(hdrcnt(Diversion)))// //{// //if(!$(hdr(Diversion)[$var(i)]{param.value,counter}{s.int}) || !$(hdr(Diversion)[$var(i)]{param.value,privacy}) || !$(hdr(Diversion)[$var(i)]{param.value,reason}))// //{// /// after all these treatments, I can not replace the good diversion header, if I have multiple diversion. Ex: If I have: /Diversion: sip:**@hexanet.fr; reason=user-busy; privacy=full ;counter=3// //Diversion: sip:**@hexanet.fr; reason=user-busy; privacy=off/ and if I use: remove_hf(Diversion), to rewrite the second diversion header. Opensips delete the first diversion header. How can I rewrite the good diversion header, here the second ? thanks Le 02/05/2013 19:21, Saúl Ibarra Corretgé a écrit : On May 2, 2013, at 4:20 PM, Mickael HUBERT wrote: Thank you very much, it's perfect ;) but, if I have many Diversion header in the same INVITE ? This command works ? You can index the call to hdr(Diversion), IIRC there is an example in the transformations page showing how to iterate through a list of headers with the same name. -- Saúl Ibarra Corretgé AG Projects ___ 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 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Disable/Enable dialog ping mid-call
Hi, Brett! Unfortunately there is no way to disable pinging. Create dialog can only be called on the initial Invite, therefore it will fail for any sequential requests. Best regards, Razvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com On 05/02/2013 07:27 PM, Brett Nemeroff wrote: Hello All, I was wondering if there is a way to enable/disable dialog pinging after create_dialog ha s been called. Can I hit create_dialog again with the changed parameters? Thanks, Brett ___ 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] variable counter parameter to diversion Header
Hi, Mickael! remove_hf() removes all headers, so it should remove both first and the second one. Then you can simply add a new header(using append_hf() function[1]) with the desired information. [1] http://www.opensips.org/html/docs/modules/1.9.x/sipmsgops.html#id249181 Best regards, Razvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com On 05/03/2013 10:58 AM, Mickael HUBERT wrote: some details: remove_hf delete all Diversion header, how can I delete or rewrite good header ? Le 03/05/2013 10:48, Mickael HUBERT a écrit : Hi, I have coded with while for treat all diversion headers. Ex: /while ($var(i) $(hdrcnt(Diversion)))// //{// //if(!$(hdr(Diversion)[$var(i)]{param.value,counter}{s.int}) || !$(hdr(Diversion)[$var(i)]{param.value,privacy}) || !$(hdr(Diversion)[$var(i)]{param.value,reason}))// //{// /// after all these treatments, I can not replace the good diversion header, if I have multiple diversion. Ex: If I have: /Diversion: sip:**@hexanet.fr; reason=user-busy; privacy=full ;counter=3// //Diversion: sip:**@hexanet.fr; reason=user-busy; privacy=off/ and if I use: remove_hf(Diversion), to rewrite the second diversion header. Opensips delete the first diversion header. How can I rewrite the good diversion header, here the second ? thanks Le 02/05/2013 19:21, Saúl Ibarra Corretgé a écrit : On May 2, 2013, at 4:20 PM, Mickael HUBERT wrote: Thank you very much, it's perfect ;) but, if I have many Diversion header in the same INVITE ? This command works ? You can index the call to hdr(Diversion), IIRC there is an example in the transformations page showing how to iterate through a list of headers with the same name. -- Saúl Ibarra Corretgé AG Projects ___ 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 ___ 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] variable counter parameter to diversion Header
Hi, it's ok now, I've delete all headers and after write news. my code: /route[diversion]// //{// //if(is_present_hf(Diversion))// //{// // //if($(hdrcnt(Diversion)) 5)// //{// //xlog(L_INFO,Diversion header = $(hdrcnt(Diversion)) is 5, hungup call\n);// //sl_send_reply(482,Loop Detected);// //exit;// //}// // //$var(i) = 0;// //$var(sumcounter) = 0;// ///*remove_hf(Diversion);*/ //while ($var(i) $(hdrcnt(Diversion)))// //{// //xlog(L_INFO, dip: $(hdr(Diversion)[$var(i)]{param.value,privacy}) \ dir: $(hdr(Diversion)[$var(i)]{param.value,reason}) \ counter: $(hdr(Diversion)[$var(i)]{param.value,counter}{s.int}) \ di: $(hdr(Diversion)[$var(i)]{nameaddr.uri}) \ number of Diversion header : $(hdrcnt(Diversion))\n);// // //if(!$(hdr(Diversion)[$var(i)]{param.value,counter}{s.int}))// //{// //$var(counter) = 1;// //$var(sumcounter) = $var(sumcounter) + $var(counter);// //}// //else// //{// //$var(counter) = $(hdr(Diversion)[$var(i)]{param.value,counter}{s.int});// //$var(sumcounter) = $var(sumcounter) + $(hdr(Diversion)[$var(i)]{param.value,counter}{s.int});// //}// // //if(!$(hdr(Diversion)[$var(i)]{param.value,privacy}))// //{// //$var(privacy) = off;// //}// //else// //{// //$var(privacy) = $(hdr(Diversion)[$var(i)]{param.value,privacy});// //}// // //if(!$(hdr(Diversion)[$var(i)]{param.value,reason}))// //{// //$var(reason) = unknown;// //}// //else// //else// //{// //$var(reason) = $(hdr(Diversion)[$var(i)]{param.value,reason});// //}// // //xlog(L_INFO,$ci Remove Diversion Header and add Diversion header with counter=$var(counter)\n); //append_hf(Diversion: $(hdr(Diversion)[$var(i)]{nameaddr.uri});reason=$var(reason);privacy=$var(privacy);counter=$var(counter)\r\n); // // //$var(i) = $var(i) + 1;// //}// // //if($var(sumcounter) 5)// //{// //xlog(L_INFO,Diversion header = Sum Counter is $var(sumcounter) 5, hungup call\n);// //sl_send_reply(482,Loop Detected);// //exit;// //}// //}// //return;// //}/ Le 03/05/2013 13:23, Răzvan Crainea a écrit : Hi, Mickael! remove_hf() removes all headers, so it should remove both first and the second one. Then you can simply add a new header(using append_hf() function[1]) with the desired information. [1] http://www.opensips.org/html/docs/modules/1.9.x/sipmsgops.html#id249181 Best regards, Razvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com On 05/03/2013 10:58 AM, Mickael HUBERT wrote: some details: remove_hf delete all Diversion header, how can I delete or rewrite good header ? Le 03/05/2013 10:48, Mickael HUBERT a écrit : Hi, I have coded with while for treat all diversion headers. Ex: /while ($var(i) $(hdrcnt(Diversion)))// //{// //if(!$(hdr(Diversion)[$var(i)]{param.value,counter}{s.int}) || !$(hdr(Diversion)[$var(i)]{param.value,privacy}) || !$(hdr(Diversion)[$var(i)]{param.value,reason}))// //{// /// after all these treatments, I can not replace the good diversion header, if I have multiple diversion. Ex: If I have: /Diversion: sip:**@hexanet.fr; reason=user-busy; privacy=full ;counter=3// //Diversion: sip:**@hexanet.fr; reason=user-busy; privacy=off/ and if I use: remove_hf(Diversion), to rewrite the second diversion header. Opensips delete the first diversion header. How can I rewrite the good diversion header, here the second ? thanks Le 02/05/2013 19:21, Saúl Ibarra Corretgé a écrit : On May 2, 2013, at 4:20 PM, Mickael HUBERT wrote: Thank you very much, it's perfect ;) but, if I have many Diversion header in the same INVITE ? This command works ? You can index the call to hdr(Diversion), IIRC there is an example in the transformations page showing how to iterate through a list of headers with the same name. -- Saúl Ibarra Corretgé AG Projects ___ 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 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org
[OpenSIPS-Users] OpenSIPS Control Panel
Hello, I have subscribed to this mailing list a few minutes ago, and this is my first post. I intend to use OpenSIPS on a light powered machine and OpenSIPS Control Panel on laptop (for graphical OpenSIPS configuration). I would like to know if this configuration is possible. Is it possible to have OCP with PhP, Apache and MySql/PostGres not on the same machine as the OpenSIPS machine? Thanks BR Pascal Rocq -- --- Pascal Rocq - Ing Système (system engineer) ACCS LOC1 Tel.:+33.(0)1.41.28.98.69 Mob:+33.(0)6.30.06.10.42 pascal.r...@c-s.fr ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] OpenSIPS Control Panel
Yes, it is possible. You need to make sure that your database accepts connections from the laptop. You mentioned that you want to use OpenSIPS on a light powered machine. One alternative for configuring and controlling OpenSIPS would be to use the built in web provisioning and management interface. It has support for all databases (including dbtext if you don't want to run a full database your light powered machine). See more here: http://www.opensips.org/html/docs/modules/1.9.x/pi_http.html http://www.opensips.org/html/docs/modules/1.9.x/mi_http.html Regards, Ovidiu Sas On Fri, May 3, 2013 at 10:11 AM, Pascal Rocq pascal.r...@c-s.fr wrote: Hello, I have subscribed to this mailing list a few minutes ago, and this is my first post. I intend to use OpenSIPS on a light powered machine and OpenSIPS Control Panel on laptop (for graphical OpenSIPS configuration). I would like to know if this configuration is possible. Is it possible to have OCP with PhP, Apache and MySql/PostGres not on the same machine as the OpenSIPS machine? Thanks BR Pascal Rocq -- --- Pascal Rocq - Ing Système (system engineer) ACCS LOC1 Tel.:+33.(0)1.41.28.98.69 Mob:+33.(0)6.30.06.10.42 pascal.r...@c-s.fr ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- VoIP Embedded, Inc. http://www.voipembedded.com ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Registrar not saving received from Path header
Hello, I sent an earlier post concerning NATed registrations not being able to locate from the lookup() function when the registration request is sent from a opensips proxy server to an opensips registration server and from my research it looks like I should be using the Path header with the received parameter set. Doing this, the Register request is sent to the registrar proxy server with a Path header, the user is successfully authorized and saved in the location table but when I look at the location table entry, the received column either does not contain a value or it contains the wrong value. Here is the Register request sent from the proxy to the registrar server and the output from the location table. REGISTER sip:my-sip-domain.com;transport=tcp SIP/2.0. Call-ID: 541d070a84f74ca6f61f68732d063d35@0:0:0:0:0:0:0:0. CSeq: 2 REGISTER. From: Nathaniel L Keeling III sip:nkeeli...@mydomain2.com;tag=cbe17bd3. To: Nathaniel L Keeling III sip:nkeeli...@mydomain2.com. Max-Forwards: 68. User-Agent: Jitsi2.0.4506.10553Mac OS X. Expires: 600. Contact: Nathaniel L Keeling III sip:nkeeling3@192.168.43.237:65457;transport=tcp;registering_acc=mydomain2_com;expires=600. Via: SIP/2.0/UDP xxx.xxx.110.38:5060;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1;i=04. Via: SIP/2.0/TCP 192.168.43.237:65457;received=208.54.44.148;branch=z9hG4bK-383637-fa379c63d9b82d3f671742fe537882a1. Authorization: Digest username=nkeeling3,realm=mydomain2.com,nonce=5184345b003b08c40d29a091fb53e6cb83c3961c1dbb,uri=sip:my-sip-domain.com;transport=tcp,response=987edb51f504ff56c7ba840d594c4bb1. Content-Length: 0. Path: sip:xxx.xxx.110.38;r2=on;lr;received=sip:208.54.44.148:43932;transport=tcp. Path: sip:xxx.xxx.110.38;transport=tcp;r2=on;lr. id | username |domain | contact | received | path | expires | q | callid | cseq | last_modified| flags | cflags | user_agent | socket | methods | sip_instance --+---+---++-+--+-++--+--+-+---++-+-+-+-- 1555 | nkeeling3 | mydomain2.com | sip:nkeeling3@192.168.43.237:65420;transport=tcp;registering_acc=mydomain2_com | sip:xxx.xxx.110.38:5060 | | 2013-05-03 17:08:03 | -1 | 869321ee55e10970ff139673909ab626@0:0:0:0:0:0:0:0 | 10 | 2013-05-03 16:58:03 | 0 | 1024 | Jitsi2.0.4506.10553Mac OS X | udp:xxx.xxx.110.48:5060 | | 1556 | nkeeling3 | mydomain2.com | sip:nkeeling3@192.168.43.237:65457;transport=tcp;registering_acc=mydomain2_com | sip:xxx.xxx.110.38:5060 | | 2013-05-03 17:13:42 | -1 | 541d070a84f74ca6f61f68732d063d35@0:0:0:0:0:0:0:0 |2 | 2013-05-03 17:03:42 | 0 | 1024 | Jitsi2.0.4506.10553Mac OS X | udp:xxx.xxx.110.48:5060 | | Thanks Nathaniel ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users