[OpenSIPS-Users] rest_get requests fail intermittently

2019-08-27 Thread Ping Han
Hi,

I am using rest_get function in the rest_client module to do https request
in the Opensips config. My opensips version is 2.4.1.

I found that intermittently Opensips fails to run the rest_get function. I
did a packet trace and saw that the request was not made to the remote
server.

Interestingly, I found:
1. this happens intermittently. Even within the same second, I can see
successful requests and also failed requests;
2. this seems to only happens for https requests, and I have never seen
this happens in http requests;
3. I can fix this by restarting the opensips instance. However, after a few
days, it starts happening again.

In the Opensip config, I have the following:
-
$var(url) = "https://example1234-dummy.com//api/v1/upload/callid/; + $ci;

$var(rc) = rest_get("$var(url)", "$var(bye_info)", "$var(ct)",
"$var(rcode)");
-

Has anyone also seen this?

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


Re: [OpenSIPS-Users] Question regarding b2b_bridge function

2017-01-15 Thread Ping Han
Hi Bogdan,

Sorry for the very late delay.

I just came back to this issue and we are still having the problem.

It would be great if you can provide a patch for testing that will expose
in local route and AVP holding the B2B logic ID.

Thanks,
Ping


On Thu, Jul 14, 2016 at 8:09 PM, Bogdan-Andrei Iancu <bog...@opensips.org>
wrote:

> Hello Ping,
>
> Sorry for the delay - if I provide a small patch for test that will expose
> in local route and AVP holding the B2B logic ID, will be fine with you ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 07.06.2016 16:15, Ping Han wrote:
>
> Hi Bogdan,
>
> Yes, that is exactly what I am trying to do.
>
> Regards,
> Ping
>
> On Tue, Jun 7, 2016 at 8:34 PM, Bogdan-Andrei Iancu <
> <bog...@opensips.org>bog...@opensips.org> wrote:
>
>> Hi Ping,
>>
>> So you need the B2B Logic ID only when you create the B2B session, in
>> order to place it in the first outgoing INVITE (as extra hdr), right ?
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 07.06.2016 04:59, Ping Han wrote:
>>
>> Thanks, Bogdan,
>>
>> What I am trying to do is to get the b2b logic ID and deliver to the
>> next hop via a custom SIP header.
>>
>> I am using the b2b_init_request("top hiding") and it looks like the only
>> place that I can add a custom header is in the local_route.
>>
>> So in the script I need the b2b logic ID after running b2b_init_request("top
>> hiding") but before the new INVITE is sent to the B party as shown
>> below.
>>
>> I am not sure how I can do that.
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question regarding b2b_bridge function

2016-06-07 Thread Ping Han
Hi Bogdan,

Yes, that is exactly what I am trying to do.

Regards,
Ping

On Tue, Jun 7, 2016 at 8:34 PM, Bogdan-Andrei Iancu <bog...@opensips.org>
wrote:

> Hi Ping,
>
> So you need the B2B Logic ID only when you create the B2B session, in
> order to place it in the first outgoing INVITE (as extra hdr), right ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 07.06.2016 04:59, Ping Han wrote:
>
> Thanks, Bogdan,
>
> What I am trying to do is to get the b2b logic ID and deliver to the next
> hop via a custom SIP header.
>
> I am using the b2b_init_request("top hiding") and it looks like the only
> place that I can add a custom header is in the local_route.
>
> So in the script I need the b2b logic ID after running b2b_init_request("top
> hiding") but before the new INVITE is sent to the B party as shown below.
>
> I am not sure how I can do that.
> [image: Inline image 2]
>
> Thanks,
> Ping
>
> On Tue, Jun 7, 2016 at 12:07 AM, Bogdan-Andrei Iancu <
> <bog...@opensips.org>bog...@opensips.org> wrote:
>
>> Hi Ping,
>>
>> My bad - in Call-ID and TO tag you have the B2B _entity_ ID, while you
>> need the B2B _logic_ ID .which is not part of the signaling at all .
>>
>> Now, in script, where do you need the b2b logic ID ? after creating the
>> B2B session (after b2b_init() ) ? Or ?
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 06.06.2016 11:46, Ping Han wrote:
>>
>> Thanks, Bogdan,
>>
>> I have done a few testing. It seems only the value of the param works for
>> this function. However, it does not look like the callid and the to-tag.
>> Is it possible to get the param value in the Opensips config?
>>
>> Please see the test results below.
>>
>> -
>> [root@opensips-02 ~]# opensipsctl fifo b2be_list
>> dlg:: 37 param=237.0 state=5 last_invite_cseq=1 last_method=0
>> last_reply_code=200 db_flag=2
>> ruri:: <http://sip:2401012350@10.216.235.38:5060>
>> sip:2401012350@10.216.235.38:5060
>> callid:: NjEyZWEyOTEwZmVlZDIzOTViMTc3YjJiMmJmY2RjODI.
>> from:: "Tropo test" uri=sip:2401012350@10.216.235.115:5060
>> tag=1e53cf61
>> to:: "2401012350" uri= <sip:2401012350@10.216.235.115:5060>
>> sip:2401012350@10.216.235.115:5060 tag=B2B.297.37
>> cseq::  caller=1 callee=1
>> route_set::
>>  
>> caller=<sip:10.216.235.72;lr;ftag=1e53cf61>,<sip:10.216.235.115;lr;ftag=1e53cf61>
>> contact::  caller= <http://sip:2401012350@10.203.1.196:22238>
>> sip:2401012350@10.203.1.196:22238 callee=sip:10.216.235.72:5060
>> send_sock:: 10.216.235.72
>> dlg:: 6715348 param=237.0 state=5 last_invite_cseq=2 last_method=4
>> db_flag=2
>> callid:: B2B.237.6715348
>> from:: "Tropo test" uri=sip:2401012350@10.216.235.115:5060
>> tag=44623c403b25fd7905bfa7a7325b2b8f
>> to::  uri= <http://sip:dialog@10.216.235.38:5060>
>> sip:dialog@10.216.235.38:5060 tag=40711690
>> cseq::  caller=2 callee=1
>> contact::  caller=sip:10.216.235.72:5060 callee=sip:
>> 10.216.235.38:5060
>> send_sock:: 10.216.235.72
>> LEGS::
>> leg:: 0 tag=40711690 cseq=2 contact=sip:
>> 10.216.235.38:5060
>>
>> [root@opensips-02 ~]# opensipsctl fifo b2b_bridge 237.6715348
>> <sip%3A123@10.203.1.196>sip:123@10.203.1.196  (this is the callid with
>> out the "B2B" prefix)
>> 500 command 'b2b_bridge' failed
>>
>> [root@opensips-02 ~]# opensipsctl fifo b2b_bridge 297.37
>> <sip%3A123@10.203.1.196>sip:123@10.203.1.196  (this is the To-tag)
>> 500 command 'b2b_bridge' failed
>>
>> [root@opensips-02 ~]# opensipsctl fifo b2b_bridge 237.0
>> <sip:123@10.203.1.196>sip:123@10.203.1.196 (this is the value of param,
>> only this works)
>>
>> -
>>
>> Regards,
>> Ping
>>
>>
>> On Fri, Jun 3, 2016 at 6:54 PM, Bogdan-Andrei Iancu <
>> <bog...@opensips.org>bog...@opensips.org> wrote:
>>
>>> Hi Ping,
>>>
>>> b2b_bridge_request() is a script function:
>>>
>>> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094
>>>
>>> I pointed to this function as you mentioned (on my question) that 

Re: [OpenSIPS-Users] Question regarding b2b_bridge function

2016-06-06 Thread Ping Han
Thanks, Bogdan,

I have done a few testing. It seems only the value of the param works for
this function. However, it does not look like the callid and the to-tag.
Is it possible to get the param value in the Opensips config?

Please see the test results below.

-
[root@opensips-02 ~]# opensipsctl fifo b2be_list
dlg:: 37 param=237.0 state=5 last_invite_cseq=1 last_method=0
last_reply_code=200 db_flag=2
ruri:: sip:2401012350@10.216.235.38:5060
callid:: NjEyZWEyOTEwZmVlZDIzOTViMTc3YjJiMmJmY2RjODI.
from:: "Tropo test" uri=sip:2401012350@10.216.235.115:5060
tag=1e53cf61
to:: "2401012350" uri=sip:2401012350@10.216.235.115:5060 tag=
B2B.297.37
cseq::  caller=1 callee=1
route_set::
 
caller=<sip:10.216.235.72;lr;ftag=1e53cf61>,<sip:10.216.235.115;lr;ftag=1e53cf61>
contact::  caller=sip:2401012350@10.203.1.196:22238 callee=sip:
10.216.235.72:5060
send_sock:: 10.216.235.72
dlg:: 6715348 param=237.0 state=5 last_invite_cseq=2 last_method=4 db_flag=2
callid:: B2B.237.6715348
from:: "Tropo test" uri=sip:2401012350@10.216.235.115:5060
tag=44623c403b25fd7905bfa7a7325b2b8f
to::  uri=sip:dialog@10.216.235.38:5060 tag=40711690
cseq::  caller=2 callee=1
contact::  caller=sip:10.216.235.72:5060 callee=sip:
10.216.235.38:5060
send_sock:: 10.216.235.72
LEGS::
leg:: 0 tag=40711690 cseq=2 contact=sip:10.216.235.38:5060

[root@opensips-02 ~]# opensipsctl fifo b2b_bridge 237.6715348
sip:123@10.203.1.196  (this is the callid with out the "B2B" prefix)
500 command 'b2b_bridge' failed

[root@opensips-02 ~]# opensipsctl fifo b2b_bridge 297.37
sip:123@10.203.1.196  (this is the To-tag)
500 command 'b2b_bridge' failed

[root@opensips-02 ~]# opensipsctl fifo b2b_bridge 237.0 sip:123@10.203.1.196
(this is the value of param, only this works)

-

Regards,
Ping


On Fri, Jun 3, 2016 at 6:54 PM, Bogdan-Andrei Iancu <bog...@opensips.org>
wrote:

> Hi Ping,
>
> b2b_bridge_request() is a script function:
>
> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094
>
> I pointed to this function as you mentioned (on my question) that you want
> to do the bridging from script level.
>
> Indeed, the equivalent MI function is b2b_bridge:
>
> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294210
>
> If you want to get that "1020.30", you can get it from Call-ID or To tag,
> where you have B2B.1020.30 (so you have to strip that B2B prefix).
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 03.06.2016 06:27, Ping Han wrote:
>
> Thanks, Bogdan,
>
> It seems the function you mentioned is the internal function  "1.4.2
> b2b_bridge_request(b2bl_key,entity_no)".
>
> Actually the function that I am trying to use is the "b2b_bridge"
> (Exported MI Functions). It is defined as below
> --
> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294210
>
>
> 1.5.2.  b2b_bridge
>
> Example: opensipsctl b2b_bridge 1020.30 <sip%3aal...@opensips.org>
> sip:al...@opensips.org
> --
>
> In the example "1020.30" is the "dialog-id". This is the parameter that I
> am not sure how to easily access in the Opensips config.
>
> What I am trying to do is to get the value and deliver to the next hop via
> a custom SIP header. When the next hop tries to transfer the call to a new
> destination. It can run the b2b_bridge command straight away with the
> "dialog-id" without rechieving the value from the Opensips database (from
> b2b_logic or b2b_entities tables).
>
> Any advice will be appreciated.
>
> Thanks,
> Ping
>
>
> On Thu, Jun 2, 2016 at 5:35 PM, Bogdan-Andrei Iancu <
> <bog...@opensips.org>bog...@opensips.org> wrote:
>
>> Hi Ping,
>>
>> In script, in a b2b route, you can look at the callid or TO tag
>> (depending on the direction) to get the key :
>>
>> http://www.opensips.org/html/docs/modules/2.2.x/b2b_logic.html#id294094
>>
>> The B2B uses that key as Call-ID when acting as UAC and as To tag when
>> acting as UAS. You can run a SIP capture to see the traffic.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 02.06.2016 05:13, Ping Han wrote:
>>
>> Hi Bogdan,
>>
>> Thanks for the information.
>>
>> I need the value in the Opensips cfg.
>>
>> I understand that I can query the b2b_logic or b2b_entit

Re: [OpenSIPS-Users] Question regarding b2b_bridge function

2016-06-02 Thread Ping Han
Thanks, Bogdan,

It seems the function you mentioned is the internal function  "1.4.2
b2b_bridge_request(b2bl_key,entity_no)".

Actually the function that I am trying to use is the "b2b_bridge" (Exported
MI Functions). It is defined as below
--
http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294210


1.5.2.  b2b_bridge

Example: opensipsctl b2b_bridge 1020.30 sip:al...@opensips.org
--

In the example "1020.30" is the "dialog-id". This is the parameter that I
am not sure how to easily access in the Opensips config.

What I am trying to do is to get the value and deliver to the next hop via
a custom SIP header. When the next hop tries to transfer the call to a new
destination. It can run the b2b_bridge command straight away with the
"dialog-id" without rechieving the value from the Opensips database (from
b2b_logic or b2b_entities tables).

Any advice will be appreciated.

Thanks,
Ping


On Thu, Jun 2, 2016 at 5:35 PM, Bogdan-Andrei Iancu <bog...@opensips.org>
wrote:

> Hi Ping,
>
> In script, in a b2b route, you can look at the callid or TO tag (depending
> on the direction) to get the key :
>
> http://www.opensips.org/html/docs/modules/2.2.x/b2b_logic.html#id294094
>
> The B2B uses that key as Call-ID when acting as UAC and as To tag when
> acting as UAS. You can run a SIP capture to see the traffic.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 02.06.2016 05:13, Ping Han wrote:
>
> Hi Bogdan,
>
> Thanks for the information.
>
> I need the value in the Opensips cfg.
>
> I understand that I can query the b2b_logic or b2b_entities tables to get
> the value in Opensips config. Apart from that could you tell me other way
> to easily access the value in Opensips config?
>
> Thanks,
> Ping
>
>
>
> On Wed, Jun 1, 2016 at 5:13 PM, Bogdan-Andrei Iancu <
> <bog...@opensips.org>bog...@opensips.org> wrote:
>
>> Hi Ping,
>>
>> Indeed, my bad - the docs are not updated, as that param was disabled
>> long time ago (4 years ago):
>> https://sourceforge.net/p/opensips/bugs/502/
>>
>> Still, there are available option. But the question is : do you need that
>> value in OpenSIPS cfg or outside OpenSIPS ? as there are different way to
>> get the ID.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 01.06.2016 03:48, Ping Han wrote:
>>
>> Hi Bogdan,
>>
>> Thank you very much for your reply.
>>
>> I have tried to use the module parameter "b2bl_key_avp" as described in
>> the document as below.
>>
>> 
>> modparam("b2b_logic", "b2bl_key_avp", "$avp(99)")
>> 
>>
>> However, I got the following errors when the Opensips is restarted.
>> 
>> ERROR:core:set_mod_param_regex: parameter  not found in
>> module 
>> 
>>
>> I am using the Opensips version opensips-2.1.2-1.el6.x86_64 (rpm).
>>
>> Thanks,
>> Chris
>>
>> On Tue, May 31, 2016 at 6:01 PM, Bogdan-Andrei Iancu <
>> <bog...@opensips.org>bog...@opensips.org> wrote:
>>
>>> Hi Chris,
>>>
>>> The "dialog_id" is actually the b2b key, that is expose by the b2b_logic
>>> via the module parameter b2bl_key_avp. See:
>>>
>>> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094
>>>
>>> That key can also be found in the b2b_logic table in DB.
>>>
>>> At signaling level, the key is the Call-ID of the outbound calls from
>>> b2b.
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>>
>>> On 23.05.2016 07:32, Ping Han wrote:
>>>
>>> Hi Bogdan,
>>>
>>> I asked the question a few days ago but have not got a response.
>>>
>>> I am just wondering if I could get some advice from you.
>>>
>>> Any advice will be appreciated.
>>>
>>> Thanks,
>>> Chris
>>>
>>> On Wed, May 18, 2016 at 4:39 PM, Ping Han < <pinghan...@gmail.com>
>>> pinghan...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to use the b2b_bridge fifo function as specified at
>&

Re: [OpenSIPS-Users] Question regarding b2b_bridge function

2016-06-01 Thread Ping Han
Hi Bogdan,

Thanks for the information.

I need the value in the Opensips cfg.

I understand that I can query the b2b_logic or b2b_entities tables to get
the value in Opensips config. Apart from that could you tell me other way
to easily access the value in Opensips config?

Thanks,
Ping



On Wed, Jun 1, 2016 at 5:13 PM, Bogdan-Andrei Iancu <bog...@opensips.org>
wrote:

> Hi Ping,
>
> Indeed, my bad - the docs are not updated, as that param was disabled long
> time ago (4 years ago):
> https://sourceforge.net/p/opensips/bugs/502/
>
> Still, there are available option. But the question is : do you need that
> value in OpenSIPS cfg or outside OpenSIPS ? as there are different way to
> get the ID.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 01.06.2016 03:48, Ping Han wrote:
>
> Hi Bogdan,
>
> Thank you very much for your reply.
>
> I have tried to use the module parameter "b2bl_key_avp" as described in
> the document as below.
>
> 
> modparam("b2b_logic", "b2bl_key_avp", "$avp(99)")
> 
>
> However, I got the following errors when the Opensips is restarted.
> 
> ERROR:core:set_mod_param_regex: parameter  not found in
> module 
> 
>
> I am using the Opensips version opensips-2.1.2-1.el6.x86_64 (rpm).
>
> Thanks,
> Chris
>
> On Tue, May 31, 2016 at 6:01 PM, Bogdan-Andrei Iancu <
> <bog...@opensips.org>bog...@opensips.org> wrote:
>
>> Hi Chris,
>>
>> The "dialog_id" is actually the b2b key, that is expose by the b2b_logic
>> via the module parameter b2bl_key_avp. See:
>>
>> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094
>>
>> That key can also be found in the b2b_logic table in DB.
>>
>> At signaling level, the key is the Call-ID of the outbound calls from b2b.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 23.05.2016 07:32, Ping Han wrote:
>>
>> Hi Bogdan,
>>
>> I asked the question a few days ago but have not got a response.
>>
>> I am just wondering if I could get some advice from you.
>>
>> Any advice will be appreciated.
>>
>> Thanks,
>> Chris
>>
>> On Wed, May 18, 2016 at 4:39 PM, Ping Han < <pinghan...@gmail.com>
>> pinghan...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I would like to use the b2b_bridge fifo function as specified at
>>> <http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id248916>
>>> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id248916.
>>>
>>> The function will be triggered by a third party. I will need to pass the
>>> parameters to the third party for it to trigger the function. One of the
>>> parameters is the "dialog-id".
>>>
>>> The problem is that I am not sure how the value of the dialog-id can be
>>> available in the Opensips config. Is there any Opensips modules/function
>>> that can retrieve the value of the dialog-id?
>>>
>>> I tried to get the value from the "b2b_entities" and "b2b_logic" table.
>>> However, it seems that it does not work this way because the two tables do
>>> not pop the data in real time. Sometimes I can see the data but sometimes I
>>> am not able to see it.
>>>
>>> It is appreciated that you can give me some idea.
>>>
>>> Thanks,
>>>
>>> Ping
>>>
>>
>>
>>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question regarding b2b_bridge function

2016-05-31 Thread Ping Han
Hi Bogdan,

Thank you very much for your reply.

I have tried to use the module parameter "b2bl_key_avp" as described in the
document as below.


modparam("b2b_logic", "b2bl_key_avp", "$avp(99)")


However, I got the following errors when the Opensips is restarted.

ERROR:core:set_mod_param_regex: parameter  not found in
module 


I am using the Opensips version opensips-2.1.2-1.el6.x86_64 (rpm).

Thanks,
Chris

On Tue, May 31, 2016 at 6:01 PM, Bogdan-Andrei Iancu <bog...@opensips.org>
wrote:

> Hi Chris,
>
> The "dialog_id" is actually the b2b key, that is expose by the b2b_logic
> via the module parameter b2bl_key_avp. See:
>
> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094
>
> That key can also be found in the b2b_logic table in DB.
>
> At signaling level, the key is the Call-ID of the outbound calls from b2b.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 23.05.2016 07:32, Ping Han wrote:
>
> Hi Bogdan,
>
> I asked the question a few days ago but have not got a response.
>
> I am just wondering if I could get some advice from you.
>
> Any advice will be appreciated.
>
> Thanks,
> Chris
>
> On Wed, May 18, 2016 at 4:39 PM, Ping Han <pinghan...@gmail.com> wrote:
>
>> Hi,
>>
>> I would like to use the b2b_bridge fifo function as specified at
>> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id248916.
>>
>> The function will be triggered by a third party. I will need to pass the
>> parameters to the third party for it to trigger the function. One of the
>> parameters is the "dialog-id".
>>
>> The problem is that I am not sure how the value of the dialog-id can be
>> available in the Opensips config. Is there any Opensips modules/function
>> that can retrieve the value of the dialog-id?
>>
>> I tried to get the value from the "b2b_entities" and "b2b_logic" table.
>> However, it seems that it does not work this way because the two tables do
>> not pop the data in real time. Sometimes I can see the data but sometimes I
>> am not able to see it.
>>
>> It is appreciated that you can give me some idea.
>>
>> Thanks,
>>
>> Ping
>>
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question regarding b2b_bridge function

2016-05-22 Thread Ping Han
Hi Bogdan,

I asked the question a few days ago but have not got a response.

I am just wondering if I could get some advice from you.

Any advice will be appreciated.

Thanks,
Chris

On Wed, May 18, 2016 at 4:39 PM, Ping Han <pinghan...@gmail.com> wrote:

> Hi,
>
> I would like to use the b2b_bridge fifo function as specified at
> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id248916.
>
> The function will be triggered by a third party. I will need to pass the
> parameters to the third party for it to trigger the function. One of the
> parameters is the "dialog-id".
>
> The problem is that I am not sure how the value of the dialog-id can be
> available in the Opensips config. Is there any Opensips modules/function
> that can retrieve the value of the dialog-id?
>
> I tried to get the value from the "b2b_entities" and "b2b_logic" table.
> However, it seems that it does not work this way because the two tables do
> not pop the data in real time. Sometimes I can see the data but sometimes I
> am not able to see it.
>
> It is appreciated that you can give me some idea.
>
> Thanks,
>
> Ping
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Question regarding b2b_bridge function

2016-05-18 Thread Ping Han
Hi,

I would like to use the b2b_bridge fifo function as specified at
http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id248916.

The function will be triggered by a third party. I will need to pass the
parameters to the third party for it to trigger the function. One of the
parameters is the "dialog-id".

The problem is that I am not sure how the value of the dialog-id can be
available in the Opensips config. Is there any Opensips modules/function
that can retrieve the value of the dialog-id?

I tried to get the value from the "b2b_entities" and "b2b_logic" table.
However, it seems that it does not work this way because the two tables do
not pop the data in real time. Sometimes I can see the data but sometimes I
am not able to see it.

It is appreciated that you can give me some idea.

Thanks,

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


Re: [OpenSIPS-Users] The "exe" function opens a file and does not close it

2015-12-02 Thread Ping Han
Hi Lonut-Razvan,

Thank you very much for fixing the issue. I am just wondering if this fix
is included in 
*http://yum.opensips.org/2.1/releases/el/6/x86_64/opensips-yum-releases-2.1-1.el7.noarch.rpm
<http://yum.opensips.org/2.1/releases/el/6/x86_64/opensips-yum-releases-2.1-1.el7.noarch.rpm>*.
We are using RPM to install Opensips.

Thanks,
Chris

On Thu, Sep 24, 2015 at 5:34 PM, Ionut Ionita <ionution...@opensips.org>
wrote:

> Hi Ping,
>
> It's been fixed from this commit
> https://github.com/OpenSIPS/opensips/commit/6a565b8b0baffd6a7ae53c65daaea468e0131c66.
> The problem was some bad parsing of the input parameter which was causing
> opening a pipe whether you set it or not, but it was not closed unless the
> parameter was set. Thank you for reporting this bug!
>
> Regards,
> Ionut-Razvan Ionita
>
>
> On 23.09.2015 16:50, Bogdan-Andrei Iancu wrote:
>
>> Hi Ping,
>>
>> You mean actual files or file descriptors ? If you do a lsof, can you see
>> which file is kept open ? Also do you see any zombie OpenSIPS processes (as
>> a result of exec() call ) ?
>>
>> Regards,
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>> On 16.09.2015 16:23, Ping Han wrote:
>>
>>> Hi,
>>>
>>> I am having a problem using the "exec" function to run a curl command.
>>> Every time the function is executed it opens a file and never close it.
>>>
>>> I have example config as follows. I am using Opensips 2.1.
>>> --
>>> $var = "http://myserver/var/tmp/test.php;;
>>> exec("curl '$var(url)'", , "$var(out)");
>>> --
>>>
>>> This results in that the number of open files reaches the system limit
>>> and the Opensips process crashes eventually. To workaround it I have to
>>> restart Opensips whenever the number of open files reaches 75% of the
>>> system limit.
>>>
>>> Has anyone seen the same issue?  Is there any solution for this?
>>>
>>> Thanks,
>>> Ping
>>>
>>>
>>> ___
>>> 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


[OpenSIPS-Users] Dynamic routing module handling Re-invite

2015-09-16 Thread Ping Han
Hi,

I am using dynamic routing module to route the calls to a "carrier", which
is configured to have two gateways (each has 50% weight). The expect
behavior is that the one call is routed to gateway 1 and the next call is
routed to gateway 2.

I have a particular scenario, which is that each call has a Re-invite
following the initial Invite. What I saw is that the initial call goes to
gateway 1 and the re-invite goes to gateway 2. This causes a problem
because gateway 2 knows anything about the initial Invite and takes the
re-invite as a new Invite.

How does Opensips handles this using Dynamic routing module? Is there a way
that Opensips always routes the Re-invite to the same gateway that it
routes the initial Invite to?

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


[OpenSIPS-Users] The "exe" function opens a file and does not close it

2015-09-16 Thread Ping Han
Hi,

I am having a problem using the "exec" function to run a curl command.
Every time the function is executed it opens a file and never close it.

I have example config as follows. I am using Opensips 2.1.
--
$var = "http://myserver/var/tmp/test.php;;
exec("curl '$var(url)'", , "$var(out)");
--

This results in that the number of open files reaches the system limit and
the Opensips process crashes eventually. To workaround it I have to restart
Opensips whenever the number of open files reaches 75% of the system limit.

Has anyone seen the same issue?  Is there any solution for this?

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


Re: [OpenSIPS-Users] Manipulate Opensips generated SIP headers

2015-06-09 Thread Ping Han
Thanks, Bogdan,

I have just upgraded Opensips from 1.9 to 2.1 and did not notice the new
features related to uac_auth. I was looking a way to dynamically match the
authentication credentials and I believe the following new parameters will
solve the problem.

auth_realm_avp
auth_username_avp
auth_password_avp

Thanks,
Ping

On Wed, Jun 10, 2015 at 2:01 AM, Bogdan-Andrei Iancu bog...@opensips.org
wrote:

  Hi Ping,

 You should not manually change the cseq in the messages as you will break
 the whole dialog (the sequential requests).

 The 2.1 version does cseq increasing (with dialog consistency) when
 performing uac_auth().

 Regards,

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

 On 05.06.2015 09:39, Ping Han wrote:

 Hi Bogdan,

  Thanks for your reply.

  I am trying to manipulate the CSeq header.

  I have attached a packet trace.

  In the example 10.216.235.38 sends a SIP Invite to 10.216.235.37 via
 Opensips. Then 10.216.235.37 challenges authentication. In the second SIP
 Invite that contains the authentication info (frame number 6), I have to
 increment the CSeq header otherwise 10.216.235.37 does not like it. The new
 CSeq is now set to 2.

  If 10.216.235.37 is not able to accept the call, it returns something
 other than 200 OK (606 in this example). Now it is the problem. Opensips
 sends back an ACK (frame number 12) with CSeq set to 1 (not 2).
 10.216.235.37 is expecting an ACK with a CSeq set to 2. The consequence is
 that 10.216.235.37 keeps sending 606 until times out.

  The ACK is internally generated by Opensips and as you said we can not
 manipulate it. I am wondering if there is any way to solve this problem.

  PS: 10.216.235.97 is the internal IP of Opensips server and
 10.216.235.74 is the external IP.

  Thanks,
 Ping


 On Thu, Jun 4, 2015 at 12:55 AM, Bogdan-Andrei Iancu bog...@opensips.org
 wrote:

  Hi Ping,

 There is no access to internally generated ACK and CANCEL requests.

 What are you trying to do ?

 Regards,

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

  On 03.06.2015 02:53, Ping Han wrote:

  Hi,

 With Opensips is there a way to manipulate the SIP headers of a messages
 that are generated locally by Opensips. See the example below.

 
 ACK sip:0370103204@192.168.100.37:5060 SIP/2.0
 Via: SIP/2.0/UDP 192.168.100.74:5060;branch=z9hG4bK5094.3ee05403.1
 From:sip:0370103...@xxxvoip.com;tag=1740643510
 Call-ID: 641613075@192.168.100.38
 To:sip:0370103204@192.168.100.37:5060;tag=1994410995-1432625097305;
 CSeq: 1 ACK
 Max-Forwards: 70
 User-Agent: OpenSIPS (2.1.0 (x86_64/linux))
 Content-Length: 0
 

 Thanks,
 Ping Han


  ___
 Users mailing 
 listUsers@lists.opensips.orghttp://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] Manipulate Opensips generated SIP headers

2015-06-09 Thread Ping Han
Hi Bogdan,

I have implemented the new features and they work perfectly.

Thanks,
Chris

On Wed, Jun 10, 2015 at 10:13 AM, Ping Han pinghan...@gmail.com wrote:

 Thanks, Bogdan,

 I have just upgraded Opensips from 1.9 to 2.1 and did not notice the new
 features related to uac_auth. I was looking a way to dynamically match the
 authentication credentials and I believe the following new parameters will
 solve the problem.

 auth_realm_avp
 auth_username_avp
 auth_password_avp

 Thanks,
 Ping

 On Wed, Jun 10, 2015 at 2:01 AM, Bogdan-Andrei Iancu bog...@opensips.org
 wrote:

  Hi Ping,

 You should not manually change the cseq in the messages as you will break
 the whole dialog (the sequential requests).

 The 2.1 version does cseq increasing (with dialog consistency) when
 performing uac_auth().

 Regards,

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

 On 05.06.2015 09:39, Ping Han wrote:

 Hi Bogdan,

  Thanks for your reply.

  I am trying to manipulate the CSeq header.

  I have attached a packet trace.

  In the example 10.216.235.38 sends a SIP Invite to 10.216.235.37 via
 Opensips. Then 10.216.235.37 challenges authentication. In the second SIP
 Invite that contains the authentication info (frame number 6), I have to
 increment the CSeq header otherwise 10.216.235.37 does not like it. The new
 CSeq is now set to 2.

  If 10.216.235.37 is not able to accept the call, it returns something
 other than 200 OK (606 in this example). Now it is the problem. Opensips
 sends back an ACK (frame number 12) with CSeq set to 1 (not 2).
 10.216.235.37 is expecting an ACK with a CSeq set to 2. The consequence is
 that 10.216.235.37 keeps sending 606 until times out.

  The ACK is internally generated by Opensips and as you said we can not
 manipulate it. I am wondering if there is any way to solve this problem.

  PS: 10.216.235.97 is the internal IP of Opensips server and
 10.216.235.74 is the external IP.

  Thanks,
 Ping


 On Thu, Jun 4, 2015 at 12:55 AM, Bogdan-Andrei Iancu bog...@opensips.org
  wrote:

  Hi Ping,

 There is no access to internally generated ACK and CANCEL requests.

 What are you trying to do ?

 Regards,

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

  On 03.06.2015 02:53, Ping Han wrote:

  Hi,

 With Opensips is there a way to manipulate the SIP headers of a messages
 that are generated locally by Opensips. See the example below.

 
 ACK sip:0370103204@192.168.100.37:5060 SIP/2.0
 Via: SIP/2.0/UDP 192.168.100.74:5060;branch=z9hG4bK5094.3ee05403.1
 From:sip:0370103...@xxxvoip.com;tag=1740643510
 Call-ID: 641613075@192.168.100.38
 To:sip:0370103204@192.168.100.37:5060;tag=1994410995-1432625097305;
 CSeq: 1 ACK
 Max-Forwards: 70
 User-Agent: OpenSIPS (2.1.0 (x86_64/linux))
 Content-Length: 0
 

 Thanks,
 Ping Han


  ___
 Users mailing 
 listUsers@lists.opensips.orghttp://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] Manipulate Opensips generated SIP headers

2015-06-05 Thread Ping Han
Hi Bogdan,

Thanks for your reply.

I am trying to manipulate the CSeq header.

I have attached a packet trace.

In the example 10.216.235.38 sends a SIP Invite to 10.216.235.37 via
Opensips. Then 10.216.235.37 challenges authentication. In the second SIP
Invite that contains the authentication info (frame number 6), I have to
increment the CSeq header otherwise 10.216.235.37 does not like it. The new
CSeq is now set to 2.

If 10.216.235.37 is not able to accept the call, it returns something other
than 200 OK (606 in this example). Now it is the problem. Opensips sends
back an ACK (frame number 12) with CSeq set to 1 (not 2). 10.216.235.37 is
expecting an ACK with a CSeq set to 2. The consequence is that
10.216.235.37 keeps sending 606 until times out.

The ACK is internally generated by Opensips and as you said we can not
manipulate it. I am wondering if there is any way to solve this problem.

PS: 10.216.235.97 is the internal IP of Opensips server and 10.216.235.74
is the external IP.

Thanks,
Ping


On Thu, Jun 4, 2015 at 12:55 AM, Bogdan-Andrei Iancu bog...@opensips.org
wrote:

  Hi Ping,

 There is no access to internally generated ACK and CANCEL requests.

 What are you trying to do ?

 Regards,

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

 On 03.06.2015 02:53, Ping Han wrote:

 Hi,

 With Opensips is there a way to manipulate the SIP headers of a messages
 that are generated locally by Opensips. See the example below.

 
 ACK sip:0370103204@192.168.100.37:5060 SIP/2.0
 Via: SIP/2.0/UDP 192.168.100.74:5060;branch=z9hG4bK5094.3ee05403.1
 From:sip:0370103...@xxxvoip.com;tag=1740643510
 Call-ID: 641613075@192.168.100.38
 To:sip:0370103204@192.168.100.37:5060;tag=1994410995-1432625097305;
 CSeq: 1 ACK
 Max-Forwards: 70
 User-Agent: OpenSIPS (2.1.0 (x86_64/linux))
 Content-Length: 0
 

 Thanks,
 Ping Han


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





cseq_issue.pcap
Description: Binary data
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Manipulate Opensips generated SIP headers

2015-06-02 Thread Ping Han
Hi,

With Opensips is there a way to manipulate the SIP headers of a messages
that are generated locally by Opensips. See the example below.


ACK sip:0370103204@192.168.100.37:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.74:5060;branch=z9hG4bK5094.3ee05403.1
From:sip:0370103...@xxxvoip.com;tag=1740643510
Call-ID: 641613075@192.168.100.38
To:sip:0370103204@192.168.100.37:5060;tag=1994410995-1432625097305;
CSeq: 1 ACK
Max-Forwards: 70
User-Agent: OpenSIPS (2.1.0 (x86_64/linux))
Content-Length: 0


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