[OpenSIPS-Users] permissions module: subnet_table_insert: subnet table is full

2013-05-23 Thread Carlos Oliva
Hello:

I'm Using Opensips-1.6.4 with permissions module to classify clients in
different groups depending of the source IP. Everything works fine but
today, after inserting a new subnet in table address and doing opensipsctl
address reload i saw in the log the message:

CRITICAL:permissions:subnet_table_insert: subnet table is full

In address table I have 178 hosts (mask 32) and 129 networks (mask != 32)

Doing opensipsctl fifo address_dump y saw 178 host entries (all OK), but
doing the command opensipsctl fifo subnet_dump shows only 128 entries.

Checking the sources I saw the filter in hash.c

count = table[PERM_MAX_SUBNETS].grp;

if (count == PERM_MAX_SUBNETS) {
LM_CRIT(subnet table is full\n);
return 0;
}

and the value of PERM_MAX_SUBNETS in hash.h is 128

I didn't found anything about this limit in module Readme.

Looking at sources of 1.8.3 seems to have the same limit (#define
PERM_MAX_SUBNETS 128 in hash.h)

My questions are:

¿Is this networks limit real? ¿Can I increase it? ¿how?


Thanks

Carlos Oliva
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] memory consumed by t_relay

2013-05-23 Thread Bogdan-Andrei Iancu
Well, this indicate that you have a bug in your test call flows - the
BYE ending the calls should also end the dialogs - there is no need for
them to expire.

Regards,

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


On 05/23/2013 06:46 AM, microx wrote:
 Hi Bogdan-Andrei,

 Thanks so much for your help. With modparam(dialog, default_timeout, n),
 the 
 dialogs are removed and the memory consumption issue is resolved.

 Best wishes,
 Chen-Che



 --
 View this message in context: 
 http://opensips-open-sip-server.1449251.n2.nabble.com/memory-consumed-by-t-relay-tp7586016p7586470.html
 Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

 ___
 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] permissions module: subnet_table_insert: subnet table is full

2013-05-23 Thread Saúl Ibarra Corretgé

On May 23, 2013, at 10:24 AM, Carlos Oliva wrote:

 Hello:
 
 I'm Using Opensips-1.6.4 with permissions module to classify clients in 
 different groups depending of the source IP. Everything works fine but today, 
 after inserting a new subnet in table address and doing opensipsctl address 
 reload i saw in the log the message:
 
 CRITICAL:permissions:subnet_table_insert: subnet table is full
 
 In address table I have 178 hosts (mask 32) and 129 networks (mask != 32)
 
 Doing opensipsctl fifo address_dump y saw 178 host entries (all OK), but 
 doing the command opensipsctl fifo subnet_dump shows only 128 entries.
 
 Checking the sources I saw the filter in hash.c
 
 count = table[PERM_MAX_SUBNETS].grp;
 
 if (count == PERM_MAX_SUBNETS) {
 LM_CRIT(subnet table is full\n);
 return 0;
 }
 
 and the value of PERM_MAX_SUBNETS in hash.h is 128 
 
 I didn't found anything about this limit in module Readme.
 
 Looking at sources of 1.8.3 seems to have the same limit (#define 
 PERM_MAX_SUBNETS 128 in hash.h)
 
 My questions are:
 
 ¿Is this networks limit real? ¿Can I increase it? ¿how?
 

I feel your pain, I hate compile time limitations with a passion. Right now the 
only way around is to modify that define to a higher value and recompile. FWIW 
I increased it to an absurdly high value (1 IIRC) and that did the job.

--
Saúl Ibarra Corretgé
AG Projects




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Use_next-$avp(gw_id) parameter

2013-05-23 Thread Bogdan-Andrei Iancu
Hi Khaled,

Check the return code of the use_next_gw() - if there is no other GW to
be used (all used), the function will return false and, of course, no
gw_id or rule_attrs will be available.

Regards,

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


On 05/22/2013 09:41 PM, M.Khaled W Chehab wrote:

 Dears

  

 I am using opensips 1.8.3 with do_routing module

 From documentation:

 The name of the avp for storing the id of the current selected
 gateway/destination - once a new destination is selected (via the
 use_next_gw() function), the AVP will be updated with the ID of the
 new selected gateway/destination.

  

 xlog(after issue 2 gw:
 $avp(gw_id) ... and attrs : $avp(rule_attrs) --);

 use_next_gw();

xlog(before issue 2 gw:
 $avp(gw_id) .. and attrs : $avp(rule_attrs) --);

 debug

 after issue 2 gw: Snell_93 ... and attrs : 1
 --

 before issue 2 gw: null .. and attrs : null
 --

 How to force do_routing function to store the : $avp(gw_id)after
 use_next_gw();

  

  

 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] Registrar not saving received from Path header

2013-05-23 Thread Bogdan-Andrei Iancu
Hello Nathaniel,

My test was just to see if your opensips hits the fixup function for the
flags - and it seems it does (the value I gave you is bogus, so it ended
up with error).

Could you try this new patch (remove old one) ? (of course, put back the
p0 param ).

Thanks and regards,

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


On 05/23/2013 01:43 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I am using opensips v1.8.3. I was using v1.8.2 earlier but I upgraded
 thinking it might fix my issue. When I changed the script to the
 save(location, $((ff))) I get this config error when starting
 opensips:

 May 22 17:39:11 [14757] ERROR:core:pv_parse_spec: pvar (inner_name)
 not found
 May 22 17:39:11 [14757] ERROR:core:pv_parse_spec: wrong char [f/102]
 in [$((ff))] at [3 (2)]
 May 22 17:39:11 [14757] ERROR:core:fixup_spve: wrong format[$((ff))]
 May 22 17:39:11 [14757] ERROR:core:fix_actions: fixing failed
 (code=-1) at cfg line 767
 May 22 17:39:11 [14757] CRITICAL:core:fix_expr: fix_actions error
 May 22 17:39:11 [14757] ERROR:core:main: failed to fix configuration
 with err code -1

 Thanks

 Nathaniel L Keeling

 On 5/22/13 11:46 AM, Bogdan-Andrei Iancu wrote:
 Could you try : save(location,$((ff))) ?
 Do you get any error ?

 What is your opensips version ?

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

 On 05/22/2013 05:49 PM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I have validated the script and that i am passing a parameter. I
 also changed the debug log statement that I displayed right before
 the save() and I still get the same output. Here is the code that I
 use in the script:


 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE, test with
 extra debug ...);
 if (!save(location, p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying to
 save Register's request location);
 sl_reply_error();
 }

 xlog(L_INFO, INFO:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit;

 Is there a better way to validate? I am not sure of what else to check.

 Thanks

 Nathaniel L Keeling

 On 5/22/13 6:02 AM, Bogdan-Andrei Iancu wrote:
 Hi Nathaniel,

 Well, the logs shows that save() does not receive any flags as
 params...everything indicates that you do not have the params or
 you are using the wrong config file.

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

 On 05/22/2013 08:22 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 Here is the output from the opensips log. I have also attached a
 snippet from the log file.

 May 21 23:39:15   OpenSips[14397]: [ID 257313 local1.debug]
 DBG:registrar:save_aux: xXx - flags param is 
 May 21 23:39:15   OpenSips[14397]: [ID 154992 local1.debug]
 DBG:registrar:save_aux: xXx - flags bitmask is 0

 May 21 23:39:15   OpenSips[14397]: [ID 269964 local1.debug]
 DBG:registrar:pack_ci: xXx - flags are 0

 Thanks

 Nathaniel L Keeling

 On 5/20/13 11:56 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 See the attached patch - it logs more from the part where the
 params are handled .

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

 On 05/18/2013 09:33 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 Here are snippets from my script. I only have one place where I
 execute the save function. Just wondering, could it be
 truncating a byte?

 modparam(usrloc, nat_bflag, 10)
 modparam(usrloc, use_domain, 1)
 modparam(usrloc, db_mode, 3)
 modparam(usrloc, db_url,
 postgres://opensips:opensip...@ama.akan.net/opensips181t)
 modparam(registrar, tcp_persistent_flag, 7)
 modparam(registrar, received_avp, $avp(received_nh))


 xlog(SAVING THE SUBSCRIBER INTO THE LOCATION TABLE
 );
 if (!save(location,p1))
 {
 xlog(L_ERR, ERR:callerid:$ci|end|System error trying
 to save Register's request location);
 sl_reply_error();
 }

 xlog(L_NOTICE, NOTICE:callerid:$ci|end|The subscriber has
 successfully registered with Akan Voice);
 exit;

 Thanks

 Nathaniel

 On 5/17/13 6:07 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 That is odd.it's like you do not set the p1 flag 

 I tested and I with p1 flag I get:
 May 17 14:05:03 [7944] DBG:registrar:pack_ci: xXx - flags
 are 10

 Are you sure your script gets to the right save() ??

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

 On 05/17/2013 09:37 AM, Nathaniel L Keeling III wrote:
 Hello Bogdan,

 I added the patch and here is what I found: OpenSips[4378]:
 [ID 269964 local1.debug] DBG:registrar:pack_ci: xXx - flags
 are 0. I have also included the log file.

 Thanks

 Nathaniel Keeling

 On 5/16/13 3:47 AM, Bogdan-Andrei Iancu wrote:
 Hello Nathaniel,

 

Re: [OpenSIPS-Users] Sip server dipping/advice

2013-05-23 Thread Bogdan-Andrei Iancu
And starting with trunk version, OpenSIPS implements a REST client - see
http://www.opensips.org/html/docs/modules/devel/rest_client.html

Regards,

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


On 05/23/2013 08:14 AM, Daniel Yu wrote:
 M.Khaled,

 It may be easier to perform HTTP Queries to perform the LRN lookup.
 Have a look at www.bulkvs.com http://www.bulkvs.com where we offer
 HTTP based LRN DIPs.

 Cheers -

 Daniel



 -- Forwarded message --
 From: *M.Khaled W Chehab* kche...@icucall.com
 mailto:kche...@icucall.com
 Date: Tue, May 14, 2013 at 6:17 AM
 Subject: [OpenSIPS-Users] Sip server dipping/advice
 To: users@lists.opensips.org mailto:users@lists.opensips.org,
 users-boun...@lists.opensips.org
 mailto:users-boun...@lists.opensips.org


 Hi,

  

  

 I am using opensips 1.8.x with do_routing module ,and trying to
 implement the US  dipping service in my script

 I am sending the call to the dipping sip server gateway and
 receive the 302 message containing  the LRN number  ,

 As as result I can have the rn number but I am sending the invite
  to the dipping provider twice ,please can you advice how to setup
 it in the right way  

 if ($rU=~^.) {

 route(7);

 route(1);

 exit;

  

 route[1] {

 if (subst_uri('/(sip:.*);nat=yes/\1/')) {

 setbflag(6);

 }

  

 if (isflagset(5)) {

search_append('Contact:.*sip:[^[:cntrl:]]*',
 ';nat=yes');

 }

  

 # for INVITEs enable some additional helper routes

 if (is_method(INVITE)) {

  

  

 t_on_branch(2);

 t_on_reply(2);

 t_on_failure(1);

 avp_db_query(UPDATE `opensips`.`invites` set
 `trunkip` ='$rd' where  `CALLID` = '$ci' );

  

 } else if (is_method(BYE)) {

 setflag(1); # do accounting ...

 setflag(3); #transaction falis

 setflag(4); #CDR Table


 xlog(Route 1
 Bye---);

   

 } else if (is_method(ACK)) {

 # call answered an ACKed, start billing here

  

 } else if (is_method(CANCEL)) {

 # call cancelled by caller, do clean up here' );

 }

  

 if (!t_relay()) {

 xlog(L_INFO, --Debug Customer
 ID:$avp(Cusid)/IP:$si--#11###Reply: $T_reply_code\n);

  

 send_reply(500,Internal Error);

 };

  

 exit;

 }

  

 route[7]{

 if (!do_routing($avp(Cusid),FW)) {

 drop();

 exit;

 }

 }

  

  

 route[6] {

 if ( use_next_gw() ) {

 $var(prefix) =
 $(avp(gw_attrs){csv.value,1});

 $rU = $var(prefix) + $avp(dst);

 xlog(L_INFO, --Debug Customer
 ID:$avp(Cusid)/IP:$si-Calling number to Next Provier $rU\n);

 setflag(26); #Missed calls

 t_on_failure(1);

 t_relay();

 exit;

 }

 }

  

  

 branch_route[2] {

 xlog(L_INFO, --Debug Customer
 ID:$avp(Cusid)/IP:$si-new branch at $ru\n);

 route(7);

 }

  

  

 failure_route[1] {

  

  

  if (!t_check_status(302)) {

 if (!next_routing()){

 xlog(L_INFO, LRN - Unable to DIP);

 t_reply(500,Unable to DIP);

 exit;

 }

 xlog(L_INFO, LRN - Unable to DIP - Trying Next);

 t_on_failure(1);

 t_relay();

 exit; 

 }

  

 if (!$(replyct.fields(uri){param.value,rn})){

xlog(L_INFO, LRN - No
 redirect information found);

 route(1);

   }else if
 ($(replyct.fields(uri){param.value,rn}) == $tU){

   xlog(L_INFO, LRN - Returned same number, no
 need to redirect);

 route(1);

   }else{

 xlog(LRN-$rU---Else lRN 
 $avp(lrnct)-);

 $rU=$avp(lrnct); 

Re: [OpenSIPS-Users] Slight problem routing 100s and 183s

2013-05-23 Thread Bogdan-Andrei Iancu
Hi Nick,

if INVITE goes .11 - .5 - .10 - .20 - .122, why the 100 reply from
.122 goes to .5 ??? replies have to be relaid back exactly on the same
path as the request.

So, the 100 reply from .122 must go to .20, not to .5 !!!

Regards,

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


On 05/22/2013 08:57 PM, Nick Khamis wrote:
 Hello Bogdan,

 Thank you so much for your response, and your time! The log is for the
 same call, only, the callid is getting changed by asterisk. What is
 happening is:

 192.168.2.11 (UAC) - 192.168.2.5 (OpenSIPSIn) INVITE
 Call-ID: 4737d441-5fb15ea7-7142c0d8@192.168.2.11
 mailto:4737d441-5fb15ea7-7142c0d8@192.168.2.11.

 192.168.2.5 (OpenSIPSIn) - 192.168.2.10 (Asterisk) INVITE
 Call-ID: 4737d441-5fb15ea7-7142c0d8@192.168.2.11
 mailto:4737d441-5fb15ea7-7142c0d8@192.168.2.11.

 192.168.2.10 (Asterisk) - 192.168.2.20 (OpenSIPSOut) INVITE
 Call-ID: 1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060
 http://1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060.

 192.168.2.20 (OpenSIPSOut) - 94.101.2.122 (Service Provider) INVITE
 Call-ID: 1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060
 http://1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060.

 94.101.2.122:5060 http://94.101.2.122:5060 (ServicProvider) -
 192.168.2.5:5060 http://192.168.2.5:5060 (OpenSIPSIn) Giving a Try
 Call-ID: 1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060
 http://1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060.

 I am assuming because the callid coming into OpenSIPSIn from the
 service provider has been changed by asterisk, and OpensipsIn is not
 aware traffic with that callid, the 183 and 200s are being ignored?

 I experienced something similar with BYEs and 404, due to changed
 callid where Vlad solved the problem by explicitly forcing dialog
 matching using match_dialog. I am not sure if that is possible here too?

 http://lists.opensips.org/pipermail/users/2013-April/025322.html

 I also thought about trying to relay the 183 and 200s coming in from
 the service provider to asterisk. The reason for this is because
 asterisk has the two callid mapped, and can relay the traffic with the
 original callid back to the proxy.

 However, to limit the traffic going back and forth, if I can use the
 match_dialog approach again it would be perfect!! 

 This is the last piece of the elephant!!! I hope I can put it together :)

 Kind Regards,

 Nick. 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Presence BLF TLS

2013-05-23 Thread Chusov Alexsandr
Sorry send wrong trace
T 2013/05/23 13:24:13.215773 10.222.1.253:37827 - 10.222.0.17:5060 [AP]
SUBSCRIBE sip:2...@g-voip.stb.ua SIP/2.0.
Via: SIP/2.0/TCP 10.222.1.253:5060;branch=z9hG4bK1334330933;rport;alias.
From: sip:9...@g-voip.stb.ua;tag=1005928247.
To: sip:2...@g-voip.stb.ua.
Call-ID: 310582788-5060...@ba.ccc.b.cfd.
CSeq: 20070 SUBSCRIBE.
Contact: sip:@10.222.1.253:5060;transport=tcp.
X-Grandstream-PBX: true.
Max-Forwards: 70.
User-Agent: Grandstream GXP2120 1.0.5.24.
Expires: 300.
Supported: replaces, path, timer, eventlist.
Event: dialog.
Accept: application/dialog-info+xml,multipart/related,application/rlmi+xml.
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
REFER, UPDATE, MESSAGE.
Content-Length: 0.
.


T 2013/05/23 13:24:13.216339 10.222.0.17:5060 - 10.222.1.253:37827 [AP]
SIP/2.0 200 OK.
Via: SIP/2.0/TCP
10.222.1.253:5060;received=10.222.1.253;branch=z9hG4bK1334330933;rport=37827;alias.
From: sip:9...@g-voip.stb.ua;tag=1005928247.
To: sip:2...@g-voip.stb.ua;tag=6b081e8cb2be0cc593bdd08e52ae2811-dae0.
Call-ID: 310582788-5060...@ba.ccc.b.cfd.
CSeq: 20070 SUBSCRIBE.
Expires: 180.
Contact: sip:sa@10.222.0.17:5060;transport=tcp.
Server: OpenSIPS (1.8.3-tls (x86_64/linux)).
Content-Length: 0.




May 23 13:24:13 stb-bsip-TEST opensips[14672]:
INFO:presence:update_subscription: notify
May 23 13:24:13 stb-bsip-TEST opensips[14672]: ERROR:tm:msg_send:
tcp_send failed
May 23 13:24:13 stb-bsip-TEST opensips[14672]: ERROR:tm:t_uac: attempt
to send to 'sip:@10.222.1.253:5060;transport=tcp' failed
May 23 13:24:13 stb-bsip-TEST opensips[14672]:
INFO:presence:send_notify_request: NOTIFY sip:9...@g-voip.stb.ua via
sip:@10.222.1.253:5060;transport=tcp on behalf of
sip:2...@g-voip.stb.ua for event dialog,
to_tag=6b081e8cb2be0cc593bdd08e52ae2811-dae0, cseq=1

2013/5/23 Chusov Alexsandr chusov.alexsa...@gmail.com:
 Hello,

 Log Opensips:

 May 23 12:29:37 stb-bsip-TEST opensips[13572]:
 INFO:presence:update_subscription: notify
 May 23 12:29:37 stb-bsip-TEST opensips[13572]: ERROR:tm:msg_send:
 tcp_send failed
 May 23 12:29:37 stb-bsip-TEST opensips[13572]: ERROR:tm:t_uac: attempt
 to send to 'sip:@10.222.1.253:5060;transport=tcp' failed
 May 23 12:29:37 stb-bsip-TEST opensips[13572]:
 INFO:presence:send_notify_request: NOTIFY sip:9...@g-voip.stb.ua via
 sip:@10.222.1.253:5060;transport=tcp on behalf of
 sip:2...@g-voip.stb.ua for event dialog,
 to_tag=6b081e8cb2be0cc593bdd08e52ae2811-fcef, cseq=1

 SIP trace tcp:

 T 2013/05/23 12:29:37.439107 10.222.1.253:45393 - 10.222.0.17:5060 [AP]
 SUBSCRIBE sip:2...@g-voip.stb.ua SIP/2.0.
 Via: SIP/2.0/TCP 10.222.1.253:5060;branch=z9hG4bK1476817771;rport;alias.
 From: sip:9...@g-voip.stb.ua;tag=971365295.
 To: sip:2...@g-voip.stb.ua.
 Call-ID: 1552429319-5060...@ba.ccc.b.cfd.
 CSeq: 20070 SUBSCRIBE.
 Contact: sip:@10.222.1.253:5060;transport=tcp.
 X-Grandstream-PBX: true.
 Max-Forwards: 70.
 User-Agent: Grandstream GXP2120 1.0.5.24.
 Expires: 300.
 Supported: replaces, path, timer, eventlist.
 Event: dialog.
 Accept: application/dialog-info+xml,multipart/related,application/rlmi+xml.
 Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
 REFER, UPDATE, MESSAGE.
 Content-Length: 0.
 .


 T 2013/05/23 12:29:37.439608 10.222.0.17:5060 - 10.222.1.253:45393 [AP]
 SIP/2.0 200 OK.
 Via: SIP/2.0/TCP
 10.222.1.253:5060;received=10.222.1.253;branch=z9hG4bK1476817771;rport=45393;alias.
 From: sip:9...@g-voip.stb.ua;tag=971365295.
 To: sip:2...@g-voip.stb.ua;tag=6b081e8cb2be0cc593bdd08e52ae2811-fcef.
 Call-ID: 1552429319-5060...@ba.ccc.b.cfd.
 CSeq: 20070 SUBSCRIBE.
 Expires: 180.
 Contact: sip:sa@10.222.0.17:5061;transport=tcp.
 Server: OpenSIPS (1.8.3-tls (x86_64/linux)).
 Content-Length: 0.

 2013/5/22 Bogdan-Andrei Iancu bog...@opensips.org:
 The registration info is used only for routing the SUBSCRIBE (which is ok).
 For the NOTIFY routing, the info from SUBSCRIBE + its 200 OK is used - this
 is why I need the pcap.

 Regards,

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


 On 05/22/2013 08:24 PM, Chusov Alexsandr wrote:

 I do not have  pcap because use TLS. But I can tomorrow create pcap TCP.
 Two phone one enable Use Actual Ephemeral Port in Contact with TCP/TLS (
 2...@g-voip.stb.ua )

 AOR:: 9...@g-voip.stb.ua
 Contact:: sip:@10.222.1.253:5060;transport=tls Q=
 Expires:: 247
 Callid:: 311684349-506...@ba.ccc.b.cfd
 Cseq:: 2053
 User-agent:: Grandstream GXP2120 1.0.5.24
 State:: CS_SYNC
 Flags:: 0
 Cflag:: 0
 Socket:: tls:10.222.0.17:5061
 Methods:: 6015
 AOR:: 2...@g-voip.stb.ua
 Contact:: sip:2083@10.222.1.221:45266;transport=tls Q=
 Expires:: 88
 Callid:: 

Re: [OpenSIPS-Users] Slight problem routing 100s and 183s

2013-05-23 Thread Nick Khamis
Hello Bogdan, thank you so much. The reason for that is the port
forwarding that is from NAT to .5 for SIP and RTP traffic. Do we have
any options to relay the .100 to .5? I tried to set some flags on .5
(i.e., if(status==183 || status=100)) in the reply_route, but
could not catch the replies coming from .122, even though the sip
trace shows the traffic coming in.

Would opensips just ignore sip traffic with callids it is not aware
of? Finally, could we not force the dialog matching for traffic coming
in from the outside with new callids?

Kind Regards,

Nick.

On 5/23/13, Bogdan-Andrei Iancu bog...@opensips.org wrote:
 Hi Nick,

 if INVITE goes .11 - .5 - .10 - .20 - .122, why the 100 reply from
 .122 goes to .5 ??? replies have to be relaid back exactly on the same
 path as the request.

 So, the 100 reply from .122 must go to .20, not to .5 !!!

 Regards,

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


 On 05/22/2013 08:57 PM, Nick Khamis wrote:
 Hello Bogdan,

 Thank you so much for your response, and your time! The log is for the
 same call, only, the callid is getting changed by asterisk. What is
 happening is:

 192.168.2.11 (UAC) - 192.168.2.5 (OpenSIPSIn) INVITE
 Call-ID: 4737d441-5fb15ea7-7142c0d8@192.168.2.11
 mailto:4737d441-5fb15ea7-7142c0d8@192.168.2.11.

 192.168.2.5 (OpenSIPSIn) - 192.168.2.10 (Asterisk) INVITE
 Call-ID: 4737d441-5fb15ea7-7142c0d8@192.168.2.11
 mailto:4737d441-5fb15ea7-7142c0d8@192.168.2.11.

 192.168.2.10 (Asterisk) - 192.168.2.20 (OpenSIPSOut) INVITE
 Call-ID: 1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060
 http://1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060.

 192.168.2.20 (OpenSIPSOut) - 94.101.2.122 (Service Provider) INVITE
 Call-ID: 1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060
 http://1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060.

 94.101.2.122:5060 http://94.101.2.122:5060 (ServicProvider) -
 192.168.2.5:5060 http://192.168.2.5:5060 (OpenSIPSIn) Giving a Try
 Call-ID: 1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060
 http://1fbe6fb90553da7c52d72b60076030f5@192.168.2.10:5060.

 I am assuming because the callid coming into OpenSIPSIn from the
 service provider has been changed by asterisk, and OpensipsIn is not
 aware traffic with that callid, the 183 and 200s are being ignored?

 I experienced something similar with BYEs and 404, due to changed
 callid where Vlad solved the problem by explicitly forcing dialog
 matching using match_dialog. I am not sure if that is possible here too?

 http://lists.opensips.org/pipermail/users/2013-April/025322.html

 I also thought about trying to relay the 183 and 200s coming in from
 the service provider to asterisk. The reason for this is because
 asterisk has the two callid mapped, and can relay the traffic with the
 original callid back to the proxy.

 However, to limit the traffic going back and forth, if I can use the
 match_dialog approach again it would be perfect!!

 This is the last piece of the elephant!!! I hope I can put it together :)

 Kind Regards,

 Nick.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Carrier route Failover

2013-05-23 Thread M.Khaled W Chehab
Hi,

 

I am using opensips 1.8.3,

 

In the do_routing($cusid,FW) I allow fail over and weight,

Moreover  I create  a two dial rules with  same priority and   prefix
1578,157 and assign to 1578 gwlist  #USA   that includes gw1 and gw2 to
it 

 for dial rule 157  I assign  gwlist gw3 

 

The dialed number is:   15782626262 

As I allow fail over so, if the call didn't succeed in connecting through
#USA (dial rule prefix 1578) it will jump to   the shortest  match  rule
that has a dial rule  prefix 157  and go to gw3 

 

Since I am in need to have both scenarios (failover and denting  failover) ,

My question is :how can I set a flag  or anything can do   after rule
prefix  1578  to allow or disallow the failing over 

 

I try to add an attribute flag (1  is  blocked  ,0 allow fail over)  on
dr_rules and get it  before use_next_gw()   ,but in this case only the call
will go to gw1 

 

$dlg_val(routeblock)=$avp(rule_attrs);  

 

if($dlg_val(routeblock)==1) {

xlog(L_INFO, --Route 6---StickCheck--avp :
$avp(rule_attrs)---$dlg_val(\routeblock\)\n);

exit;

  } 

 

Please advice 

Regards

 

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips topology_hiding() , uac_auth() , B2B

2013-05-23 Thread Roman Davydov
Hello!

Could you please just direct me little bit...

centos 6.3
opensips-1.9.1
rtpproxy-1.2.1

I am trying to build a node that will play a b2b role.

What I am looking for:
1. use several send_socket IP (depends on route)
2. use rtpproxy with different IP (depends on route)
3. use INVITE auth if required
4. Hide topology only from the called (leg B) party
5. I don't need NAT
6. I don't need to handle REGISTER

What I got:
1. listen on several interfaces
2. force_send_socket for setting IP
3. use different rtpproxy sets for selecting proxy IP
4. use dialog  topology_hiding() for hiding
5. use uac_auth() for adding auth info + fix of Cseq header
6. use UAC functions for changing from and to


I don't ask you to guide me how to write a config, just let me know if I've
selected correct way for the task. Or it is much simpler to solve with b2b
module? Cause I was not able to implement all I need with b2b, probably I
did it wrong...


P.S.
It is my first email here


Best Regards,
Roman Davydov,
site: www.openvoip.co
email: openvoip...@gmail.com
cell: +1 (347) 637-8703
skype: openvoip.co
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar not saving received from Path header

2013-05-23 Thread Nathaniel L Keeling III

Hello Bogdan,

The change that you did is now causing things to work. I have attached a 
snippet of the log file and I have listed the output from the extra 
debug lines from your patch within the email:


May 23 09:31:28   OpenSips[23458]: [ID 197553 local1.error] SAVING THE 
SUBSCRIBER INTO THE LOCATION TABLE, test with extra debug 
...
May 23 09:31:28   OpenSips[23458]: [ID 795617 local1.debug] 
DBG:registrar:save_aux: xXx - flags param is 10038f8a0
May 23 09:31:28   OpenSips[23458]: [ID 956053 local1.debug] 
DBG:registrar:save_aux: xXx - flags string is p0
May 23 09:31:28   OpenSips[23458]: [ID 154992 local1.debug] 
DBG:registrar:save_aux: xXx - flags bitmask is 20
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=

.
.
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=800
May 23 09:31:28   OpenSips[23458]: [ID 269964 local1.debug] 
DBG:registrar:pack_ci: xXx - flags are 20
May 23 09:31:28   OpenSips[23458]: [ID 692724 local1.debug] 
DBG:registrar:pack_ci: xXx - saving path into usrloc
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] 
DBG:core:parse_headers: flags=


Thanks

Nathaniel L Keeling

On 5/23/13 4:44 AM, Bogdan-Andrei Iancu wrote:

Hello Nathaniel,

My test was just to see if your opensips hits the fixup function for 
the flags - and it seems it does (the value I gave you is bogus, so it 
ended up with error).


Could you try this new patch (remove old one) ? (of course, put back 
the p0 param ).


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


{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww21340\viewh14540\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural

\f0\fs24 \cf0 May 23 09:31:28   OpenSips[23458]: [ID 197553 local1.error] SAVING THE SUBSCRIBER INTO THE LOCATION TABLE, test with extra debug ...\
May 23 09:31:28   OpenSips[23458]: [ID 795617 local1.debug] 
\b DBG:registrar:save_aux: xXx - flags param is 10038f8a0
\b0  \
May 23 09:31:28   OpenSips[23458]: [ID 956053 local1.debug] 
\b DBG:registrar:save_aux: xXx - flags string is p0
\b0  \
May 23 09:31:28   OpenSips[23458]: [ID 154992 local1.debug] 
\b DBG:registrar:save_aux: xXx - flags bitmask is 20 
\b0 \
May 23 09:31:28   OpenSips[23458]: [ID 497291 local1.debug] DBG:core:parse_headers: flags=\
May 23 09:31:28   OpenSips[23458]: [ID 421386 local1.debug] DBG:core:parse_uri: parsed uri:\
May 23 09:31:28type=1 user=nkeeling(8)\
May 23 09:31:28passwd=(0)\
May 23 09:31:28host=akanvoice.com(13)\
May 23 09:31:28port=(0): 0\
May 23 09:31:28params=(0)\
May 23 09:31:28headers=(0)\
May 23 09:31:28   OpenSips[23458]: [ID 883594 local1.debug] DBG:core:parse_uri:  uri params:\
May 23 09:31:28  transport=, val=, proto=0\
May 23 09:31:28   OpenSips[23458]: [ID 996803 local1.debug] DBG:core:parse_uri:user-param=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 784403 local1.debug] DBG:core:parse_uri:method=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 185236 local1.debug] DBG:core:parse_uri:ttl=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 628781 local1.debug] DBG:core:parse_uri:maddr=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 949013 local1.debug] DBG:core:parse_uri:lr=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 595631 local1.debug] DBG:core:parse_uri:r2=, val=\
May 23 09:31:28   OpenSips[23458]: [ID 323951 local1.debug] DBG:db_postgres:db_postgres_val2str: PQescapeStringConn: in: 8 chars, out: 8 chars\
May 23 09:31:28   OpenSips[23458]: [ID 323951 local1.debug] DBG:db_postgres:db_postgres_val2str: PQescapeStringConn: in: 13 chars, out: 13 chars\
May 23 09:31:28   OpenSips[23458]: [ID 181770 local1.debug] DBG:db_postgres:db_postgres_submit_query: 100391220 PQsendQuery(select contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified,sip_instance from location where username='nkeeling' AND domain='akanvoice.com' order by q)\
May 23 09:31:28   OpenSips[23458]: [ID 529718 local1.debug] DBG:core:db_new_result: allocate 48 bytes for result set at 1003960d0\
May 23 09:31:28   OpenSips[23458]: [ID 911073 local1.debug] DBG:db_postgres:db_postgres_store_result: 100391220 PQresultStatus(PGRES_TUPLES_OK) PQgetResult(100782900)\
May 23 09:31:28   OpenSips[23458]: [ID 460951 local1.debug] DBG:db_postgres:db_postgres_get_columns: 14 columns returned from the query\
May 23 09:31:28   OpenSips[23458]: [ID 586195 local1.debug] DBG:core:db_allocate_columns: allocate 392 bytes for result columns at 100396358\
May 23 09:31:28   OpenSips[23458]: [ID 412218 local1.debug] DBG:db_postgres:db_postgres_get_columns: 

[OpenSIPS-Users] Event-RabbitMQ (and Event in general): pvar for event names

2013-05-23 Thread Bobby Smith
Greetings list,

I'd like to be able to use a pvar in the subscribe function for the event
interface like so:
subscribe($avp(event_name), $avp(rabbit_url))

Where event_name would be like E_CUSTOM_SUBSCRIBE and url would be
rabbitmq:localhost/$fU

I know this is not supported yet and I'd be interested in implementing it,
but understanding how pvars work is kinda tough without documentation.
Also, it seems like you have to have a sip_msg in context for the function
to translate a pvar into it's data type, but in the event interface it's
not passed in.

Any thoughts?  I'd prefer not to use an infinite case statement: my use
case is having a 1.9.x route block with param() calls that pass in the
event name and the pvar for the queue name to subscribe to.

Thanks list!
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users