Re: [OpenSIPS-Users] capturing the media address upon conenction

2024-06-11 Thread Jehanzaib Younis
You can save the initial media address.

rtpengine_offer();
$var(media_address_invite) = $rtpengine_media_address;

and then save the updated media address
if (is_method("ACK")) {
rtpengine_answer();
$var(media_address_200ok) = $rtpengine_media_address;
}

You can do manipulation in the ACK check if you want to save in the cdr
just use acc module and save.

Regards,
Jehanzaib


On Wed, Jun 12, 2024 at 6:11 AM Saint Michael  wrote:

> I need to save the media address offering to the CDR. I understand
> that it comes with the INVITE but it changes upon connection.  Any
> idea how to do this?
> Also, I need to drop the call if the media address matches a list of
> blocked addresses.
> Philip
>
> ___
> 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 call center module

2024-05-07 Thread Jehanzaib Younis
Does it always stay in the  incall State? If this is the case then you need
to check somehow BYE or CANCEL not working properly.

Regards,
Jehanzaib


On Tue, May 7, 2024 at 6:03 PM Prathibha B  wrote:

> "Agents": [
> {
> "id": "101001",
> "Ref": 1,
> "Loged in": "YES",
> "State": "incall"
> },
> {
> "id": "101002",
> "Ref": 1,
> "Loged in": "YES",
> "State": "incall"
> }
> ]
>
> The agent state shows status as incall.
>
> On Tue, 7 May 2024 at 06:35, Jehanzaib Younis 
> wrote:
>
>> Hi Parathiba,
>>
>> Could you capture the SIP packets? They'll provide insight into what's
>> going on.
>>
>>
>> Regards,
>> Jehanzaib
>>
>>
>> On Tue, May 7, 2024 at 12:40 AM Prathibha B 
>> wrote:
>>
>>> I'm able to hear the message given in the message queue but the call is
>>> not getting transferred to the online agent,
>>>
>>> --
>>> Regards,
>>> B.Prathibha
>>> ___
>>> 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
>>
>
>
> --
> Regards,
> B.Prathibha
> ___
> 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 answer a call with a wav file?

2024-05-06 Thread Jehanzaib Younis
Hi Eran,

Have you tried rtpengine_manage() before playing the media ?

rtpengine_manage();
rtpengine_play_media("file=ringback_tone_file.wav");
exit;


Regards,
Jehanzaib


On Tue, May 7, 2024 at 2:10 AM Eran Leshem  wrote:

> Hi, I would like to create a special extension that will answer by playing
> a wav file back to the caller.
>
> The call will be as such:
> 1. The caller will call the special extension: "wav-call"
> 2. Instead of someone answering his call, the calling person will hear
> a sound (a song, a wav file), being played back to him.
> 3. After that, the caller will hang-up.
>
> I have tried to do it in several ways, but failed.
> I looked at the documentation and I have tried using:
>
> rtpengine_play_media("file=/path/to/ringback_tone_file.wav");
>
> but, did not succeed.
> I keep getting: "Unknown call-ID"
>
> My machine:
> - Linux Mint 21.3 which is based on Ubuntu 22.04 LTS (Jammy Jellyfish),
> - 16 GB memory,
> - OpenSIPS version 3.4
> - RTPEngine is installed.
>
> Any ideas?
> - Thanks, Eran L.
> ___
> 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 call center module

2024-05-06 Thread Jehanzaib Younis
Hi Parathiba,

Could you capture the SIP packets? They'll provide insight into what's
going on.


Regards,
Jehanzaib


On Tue, May 7, 2024 at 12:40 AM Prathibha B 
wrote:

> I'm able to hear the message given in the message queue but the call is
> not getting transferred to the online agent,
>
> --
> Regards,
> B.Prathibha
> ___
> 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] Best way to call with prefix and trunks

2024-02-29 Thread Jehanzaib Younis
Hi,

You can use drouting for IP based authentication trunks.
For username/password based i think you can use digest_auth somethin like

digest_domain("MySIPTrunkRealm", "sip.trunk1.com", "username1", "password1")
digest_domain("MySIPTrunkRealm", "sip.trunk2.com", "username2", "password2")

in the routing you can do something like the following:-

if (is_method("INVITE") && has_totag()) {
 $var(dest_ip) = $si;
 if (!digest_auth_check("$var(dest_ip)", "MySIPTrunkRealm",
"username", "password")) {
xlog("L_ERR", "Failed to authenticate call to $var(dest_ip)\n");
sl_send_reply("403", "Forbidden");
exit;
 }

# Route the call to the trunk
route(SOME_OTHER_ROUTE);
}


Regards,
Jehanzaib


On Fri, Mar 1, 2024 at 12:21 PM Social Boh  wrote:

> First reply;
>
> UAC, UAC AUTH and DROUTING Modules
>
> ?
>
> ---
> I'm SoCIaL, MayBe
>
> El 29/02/2024 a las 4:05 p. m., Social Boh escribió:
> > Hello list,
> >
> > I have to make calls to PSTN using trunks con IP auth y trunks with
> > user and password
> >
> > I'd like use DROUTING module but I don't know how solve user/password
> > auth trunk
> >
> > Any idea?
> >
> > Thank you
> >
> > 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] CANCEL handling issue

2023-12-05 Thread Jehanzaib Younis
Hi Bogdan,

I have the same issue, i have just upgraded the opensips to 3.4.2 version.
It did not fix the issue but the other issue iam getting is t_relay is not
accepting any parameter.
The documentation is not clearly saying how to put *no-auto-477* - (old
*0x02* flag). in my old 3.3.2 version i used to t_relay(2) but it is not
working in the 3.4.2 version anymore. i tried all the options but none of
them is working.


Regards,
Jehanzaib


On Tue, Nov 28, 2023 at 10:54 PM Jehanzaib Younis 
wrote:

> I have the exact same issue. I am also not able to change the Via header.
>
> Regards,
> Jehanzaib
>
>
> On Tue, Nov 28, 2023 at 10:48 PM Jehanzaib Younis <
> jehanzaib.ki...@gmail.com> wrote:
>
>> Hi Bogdan,
>>
>> The only difference is, I am receiving traffic on UDP and sending on TCP
>> socket.
>> sorry i forgot to mention before the advertised_address is
>> globally defined (public ip)
>>
>>
>> Regards,
>> Jehanzaib
>>
>>
>> On Tue, Nov 28, 2023 at 10:26 PM Bogdan-Andrei Iancu 
>> wrote:
>>
>>> Hi,
>>>
>>> I just made a simple test using only `advertised_address` and calling
>>> from A to B and cancelling from A. The CANCEL from OpenSIPS to B obeys the
>>> advertising. I used the latest 3.3 :
>>> version: opensips 3.3.8 (x86_64/linux)
>>>
>>> Tested with both UDP and TCP, worked in both cases.
>>>
>>> SO, try also the latest 3.3, to see if it works for you too. If not, try
>>> to put together a minimal cfg to support user registration + calls between
>>> users, cfg to show the problem.
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>>   https://www.opensips-solutions.com
>>>   https://www.siphub.com
>>>
>>> On 27.11.2023 13:44, nz deals wrote:
>>>
>>> Hi Bogdan,
>>> No other advertisement via socket definition or any script function.
>>>
>>> Thank you
>>>
>>> On Fri, 24 Nov 2023 at 05:47, Bogdan-Andrei Iancu 
>>> wrote:
>>>
>>>> Just checking, only the `advertised_address` global param [1], no other
>>>> kind of advertising (via socket definition or script function) ?
>>>>
>>>> [1]
>>>> https://www.opensips.org/Documentation/Script-CoreParameters-3-3#advertised_address
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>>
>>>> OpenSIPS Founder and Developer
>>>>   https://www.opensips-solutions.com
>>>>   https://www.siphub.com
>>>>
>>>> On 11/22/23 10:47 PM, nz deals wrote:
>>>>
>>>> Hi Bogdan,
>>>> My opensips version is opensips 3.3.5 (x86_64/linux)
>>>>
>>>> Regards,
>>>> Jason
>>>>
>>>> On Thu, 23 Nov 2023 at 01:49, Bogdan-Andrei Iancu 
>>>> wrote:
>>>>
>>>>> What is your exact opensips version ( `opensips -V` ) ?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bogdan-Andrei Iancu
>>>>>
>>>>> OpenSIPS Founder and Developer
>>>>>   https://www.opensips-solutions.com
>>>>>   https://www.siphub.com
>>>>>
>>>>> On 11/22/23 12:24 PM, nz deals wrote:
>>>>>
>>>>> Thanks Bogdan,
>>>>>
>>>>> It is due to receiving CANCEL from the caller. Yes using an
>>>>> advertised_address globally. One of our public addresses.
>>>>>
>>>>> Thanks
>>>>>
>>>>> On Wed, 22 Nov 2023 at 23:08, Bogdan-Andrei Iancu 
>>>>> wrote:
>>>>>
>>>>>> Hi Jason,
>>>>>>
>>>>>> The CANCEL generated by OpenSIPS, is it due to a received CANCEL or
>>>>>> due to an internal timeout / forking? ALso do you use any advertising in
>>>>>> your setup? if yes, is it per socket, global or ?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Bogdan-Andrei Iancu
>>>>>>
>>>>>> OpenSIPS Founder and Developer
>>>>>>   https://www.opensips-solutions.com
>>>>>>   https://www.siphub.com
>>>>>>
>>>>>> On 11/22/23 7:04 AM, nz deals wrote:
>>>>>>
>>>>>> Hi folks,
>>>>>>
>>>>>> Is there any bug in the CANCEL handling in the version 3.3.x?
>>>>>> I have a weird issue,
>>>>>> The INVITE have a VIA header as my private ip
>>>>>> Via: SIP/2.0/TCP 192.XX.XX.XX:5060;branch=XXX
>>>>>>
>>>>>> But when i CANCEL the call, the CANCEL have my public ip in the VIA
>>>>>> header.
>>>>>> Via: SIP/2.0/TCP 104.xx.xx.xx:5060;branch=xxx
>>>>>>
>>>>>> Anyway can I change the via in the cancel?
>>>>>>
>>>>>> Regards,
>>>>>> Jason
>>>>>>
>>>>>> ___
>>>>>> 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
>>>
>>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] CANCEL handling issue

2023-11-28 Thread Jehanzaib Younis
I have the exact same issue. I am also not able to change the Via header.

Regards,
Jehanzaib


On Tue, Nov 28, 2023 at 10:48 PM Jehanzaib Younis 
wrote:

> Hi Bogdan,
>
> The only difference is, I am receiving traffic on UDP and sending on TCP
> socket.
> sorry i forgot to mention before the advertised_address is
> globally defined (public ip)
>
>
> Regards,
> Jehanzaib
>
>
> On Tue, Nov 28, 2023 at 10:26 PM Bogdan-Andrei Iancu 
> wrote:
>
>> Hi,
>>
>> I just made a simple test using only `advertised_address` and calling
>> from A to B and cancelling from A. The CANCEL from OpenSIPS to B obeys the
>> advertising. I used the latest 3.3 :
>> version: opensips 3.3.8 (x86_64/linux)
>>
>> Tested with both UDP and TCP, worked in both cases.
>>
>> SO, try also the latest 3.3, to see if it works for you too. If not, try
>> to put together a minimal cfg to support user registration + calls between
>> users, cfg to show the problem.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>>   https://www.siphub.com
>>
>> On 27.11.2023 13:44, nz deals wrote:
>>
>> Hi Bogdan,
>> No other advertisement via socket definition or any script function.
>>
>> Thank you
>>
>> On Fri, 24 Nov 2023 at 05:47, Bogdan-Andrei Iancu 
>> wrote:
>>
>>> Just checking, only the `advertised_address` global param [1], no other
>>> kind of advertising (via socket definition or script function) ?
>>>
>>> [1]
>>> https://www.opensips.org/Documentation/Script-CoreParameters-3-3#advertised_address
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>>   https://www.opensips-solutions.com
>>>   https://www.siphub.com
>>>
>>> On 11/22/23 10:47 PM, nz deals wrote:
>>>
>>> Hi Bogdan,
>>> My opensips version is opensips 3.3.5 (x86_64/linux)
>>>
>>> Regards,
>>> Jason
>>>
>>> On Thu, 23 Nov 2023 at 01:49, Bogdan-Andrei Iancu 
>>> wrote:
>>>
>>>> What is your exact opensips version ( `opensips -V` ) ?
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>>
>>>> OpenSIPS Founder and Developer
>>>>   https://www.opensips-solutions.com
>>>>   https://www.siphub.com
>>>>
>>>> On 11/22/23 12:24 PM, nz deals wrote:
>>>>
>>>> Thanks Bogdan,
>>>>
>>>> It is due to receiving CANCEL from the caller. Yes using an
>>>> advertised_address globally. One of our public addresses.
>>>>
>>>> Thanks
>>>>
>>>> On Wed, 22 Nov 2023 at 23:08, Bogdan-Andrei Iancu 
>>>> wrote:
>>>>
>>>>> Hi Jason,
>>>>>
>>>>> The CANCEL generated by OpenSIPS, is it due to a received CANCEL or
>>>>> due to an internal timeout / forking? ALso do you use any advertising in
>>>>> your setup? if yes, is it per socket, global or ?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bogdan-Andrei Iancu
>>>>>
>>>>> OpenSIPS Founder and Developer
>>>>>   https://www.opensips-solutions.com
>>>>>   https://www.siphub.com
>>>>>
>>>>> On 11/22/23 7:04 AM, nz deals wrote:
>>>>>
>>>>> Hi folks,
>>>>>
>>>>> Is there any bug in the CANCEL handling in the version 3.3.x?
>>>>> I have a weird issue,
>>>>> The INVITE have a VIA header as my private ip
>>>>> Via: SIP/2.0/TCP 192.XX.XX.XX:5060;branch=XXX
>>>>>
>>>>> But when i CANCEL the call, the CANCEL have my public ip in the VIA
>>>>> header.
>>>>> Via: SIP/2.0/TCP 104.xx.xx.xx:5060;branch=xxx
>>>>>
>>>>> Anyway can I change the via in the cancel?
>>>>>
>>>>> Regards,
>>>>> Jason
>>>>>
>>>>> ___
>>>>> 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
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] CANCEL handling issue

2023-11-28 Thread Jehanzaib Younis
Hi Bogdan,

The only difference is, I am receiving traffic on UDP and sending on TCP
socket.
sorry i forgot to mention before the advertised_address is globally defined
(public ip)


Regards,
Jehanzaib


On Tue, Nov 28, 2023 at 10:26 PM Bogdan-Andrei Iancu 
wrote:

> Hi,
>
> I just made a simple test using only `advertised_address` and calling
> from A to B and cancelling from A. The CANCEL from OpenSIPS to B obeys the
> advertising. I used the latest 3.3 :
> version: opensips 3.3.8 (x86_64/linux)
>
> Tested with both UDP and TCP, worked in both cases.
>
> SO, try also the latest 3.3, to see if it works for you too. If not, try
> to put together a minimal cfg to support user registration + calls between
> users, cfg to show the problem.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
>   https://www.siphub.com
>
> On 27.11.2023 13:44, nz deals wrote:
>
> Hi Bogdan,
> No other advertisement via socket definition or any script function.
>
> Thank you
>
> On Fri, 24 Nov 2023 at 05:47, Bogdan-Andrei Iancu 
> wrote:
>
>> Just checking, only the `advertised_address` global param [1], no other
>> kind of advertising (via socket definition or script function) ?
>>
>> [1]
>> https://www.opensips.org/Documentation/Script-CoreParameters-3-3#advertised_address
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>>   https://www.siphub.com
>>
>> On 11/22/23 10:47 PM, nz deals wrote:
>>
>> Hi Bogdan,
>> My opensips version is opensips 3.3.5 (x86_64/linux)
>>
>> Regards,
>> Jason
>>
>> On Thu, 23 Nov 2023 at 01:49, Bogdan-Andrei Iancu 
>> wrote:
>>
>>> What is your exact opensips version ( `opensips -V` ) ?
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>>   https://www.opensips-solutions.com
>>>   https://www.siphub.com
>>>
>>> On 11/22/23 12:24 PM, nz deals wrote:
>>>
>>> Thanks Bogdan,
>>>
>>> It is due to receiving CANCEL from the caller. Yes using an
>>> advertised_address globally. One of our public addresses.
>>>
>>> Thanks
>>>
>>> On Wed, 22 Nov 2023 at 23:08, Bogdan-Andrei Iancu 
>>> wrote:
>>>
 Hi Jason,

 The CANCEL generated by OpenSIPS, is it due to a received CANCEL or due
 to an internal timeout / forking? ALso do you use any advertising in your
 setup? if yes, is it per socket, global or ?

 Regards,

 Bogdan-Andrei Iancu

 OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com

 On 11/22/23 7:04 AM, nz deals wrote:

 Hi folks,

 Is there any bug in the CANCEL handling in the version 3.3.x?
 I have a weird issue,
 The INVITE have a VIA header as my private ip
 Via: SIP/2.0/TCP 192.XX.XX.XX:5060;branch=XXX

 But when i CANCEL the call, the CANCEL have my public ip in the VIA
 header.
 Via: SIP/2.0/TCP 104.xx.xx.xx:5060;branch=xxx

 Anyway can I change the via in the cancel?

 Regards,
 Jason

 ___
 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] B2B Opensips + RTPEngine

2023-06-06 Thread Jehanzaib Younis
Hi there,

Can you write an example of how you used rtpengine_offer() ?


Regards,
Jehanzaib


On Wed, Jun 7, 2023 at 3:07 AM  wrote:

> Hello Community,
>
>
>
> We are trying to set up an Opensips with RTPEngine in a B2B configuration
> to handle media processing. There is no scenario for the B2B we’re trying
> to implement, we’re just using the topology « «top hiding » !
>
> However, regardless of our configuration, the SDP of the INVITE and 200 OK
> packets is not modified to include the RTPEngine IP address and port
>
>
>
> How should the RTPEngine be configured in the Opensips.cfg or which
> function(s) should be called to achieve this?
>
> Bien Cordialement,
>
>  
>
> *Kharroubi Mohamed*
> Senior DevOps/System Engineer
>
> Orange/ IMT/ OLPS/ OPS/ International Centers/ Tunisia
>
>
>
> mohamed.kharro...@sofrecom.com
>
> www.sofrecom.com
>
> *Part of the Orange group*
>
>
> ___
> 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] Mid_Registrar contact

2022-11-17 Thread Jehanzaib Younis
Hi there,
Just t_relay(); to the Asterisk IP,  it should work perfectly fine.


Regards,
Jehanzaib


On Fri, Nov 18, 2022 at 12:09 AM nutxase via Users 
wrote:

> Yes so thats my idea but the problem i see is that asterisk sees the
> contact as the opensips details not the UAC device
>
>
> Sent with Proton Mail  secure email.
>
> --- Original Message ---
> On Thursday, November 17th, 2022 at 11:04 AM, johan 
> wrote:
>
> If you don't want to handle the r3egister locally, why don't you just
> forward it then ? (i.e. the path approach)
> On 17/11/2022 11:45, Liviu Chircu wrote:
>
> On 17.11.2022 12:37, nutxase wrote:
>
> Just to confirm can registrar also forward the registration similar to how
> mid_registrar does?
>
> Approach 1: the save()
> 
> function has an "r" flag (do not auto-send a reply upstream) which may be
> useful here, allowing you to t_relay() your REGISTER further downstream. A
> caveat here is that you're saving the Contact before the Asterisk, which
> may fail (e.g. 500 Internal Server Error). So what do you do then? You must
> delete it somehow...
>
> Approach 2: if I remember correctly, the save()
> 
> function was also designed to work on a 200 OK reply! But I haven't tested
> this scenario in a long time, so I'm not sure how well or if it works at
> all nowadays.
>
> Best,
>
> --
> Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com
> OpenSIPS eBootcamp 5-16 Dec | www.opensips.org/training
>
>
> ___
> 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Local Route question

2022-10-26 Thread Jehanzaib Younis
Hi Micheal,

You can use t_on_reply and then something like this:
  if (t_check_status("200")) {
 ..your db query
  }

Regards,
Jehanzaib


On Thu, Oct 27, 2022 at 9:22 AM Saint Michael  wrote:

> Thank you for the clarification.
> But then how do you intercept the Connect?
> Where in the code?
> I need to fire a db query when the call connects.
> Is this even possible?
>
>
>
> On Wed, Oct 26, 2022, 10:51 AM Bogdan-Andrei Iancu 
> wrote:
>
>> Hi,
>>
>> please see
>> https://www.opensips.org/Documentation/Script-Routes-3-2#local_route -
>> the local route is triggered only for internally generated (UAC)
>> requests, so you will never have replies over there.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>https://www.opensips-solutions.com
>> OpenSIPS Bootcamp 5-16 Dec 2022, online
>>https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>>
>> On 10/26/22 5:28 AM, Saint Michael wrote:
>> > Dear Friends
>> > local_route
>> > {
>> > if (is_method("200"))
>> > {
>> > }
>> > }
>> >
>> > I need to intercept the code at the moment when a call connects, so I
>> > may notify that information to the database. What specific code can I
>> > use inside a Local Route so the 200 OK corresponds with a real
>> > connection and not any other kind of 200?
>> > Is this doable?
>> >
>> > ___
>> > 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] no TLS client domain found error

2022-08-08 Thread Jehanzaib Younis
Thank you Bogdan,
I will change it. By the way, I noticed that as soon as I added the
following before the OPTIONS were sent to MS Teams. There were no
CRITICAL:core:io_watch_add bug logs.

set_advertised_address("xx.xx.xx.xx");
set_advertised_port("5061");

Regards,
Jehanzaib


On Wed, May 25, 2022 at 7:52 PM Bogdan-Andrei Iancu 
wrote:

> Hi Jehanzaib,
>
> For now, to get rid of that issue, just disable the tls_async in your cfg:
>
> https://opensips.org/html/docs/modules/3.2.x/proto_tls.html#param_tls_async
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>   https://www.opensips.org/events/Summit-2022Athens/
>
> On 5/21/22 5:21 AM, Jehanzaib Younis wrote:
>
> Thank you, Ovidiu.
> I Just posted my logs on github.
>
> Regards,
> Jehanzaib
>
>
> On Fri, May 20, 2022 at 3:02 AM Ovidiu Sas  wrote:
>
>> Set the log_level parameter to 4 and restart opensips. Once the error
>> occurs, collect all the logs from the start (from syslog) and send them to
>> Razvan.
>> There’s bug tracking this issue:
>> https://github.com/OpenSIPS/opensips/issues/2724
>>
>> For compiling tls_wolfssl, try from a clean clone.
>>
>> -ovidiu
>>
>> On Thu, May 19, 2022 at 08:08 Jehanzaib Younis 
>> wrote:
>>
>>> Thanks Ovidiu,
>>> I just checked the source code, the same bug is also present in
>>> the opensips-3.2.6 branch. I have another issue with 3.2.6. I am not able
>>> to compile tls_wolfssl. No issue with 3.3 though.
>>> Now I need to check what is causing this.
>>>
>>> I am getting the following error:
>>>
>>> make[1]: Entering directory `/usr/src/opensips-3.2/modules/tls_wolfssl'
>>> configure: WARNING: unrecognized options: --disable-shared,
>>> --enable-static
>>> checking whether make supports nested variables... (cached) yes
>>> ./configure: line 5259: syntax error near unexpected token `2.4.2'
>>> ./configure: line 5259: `LT_PREREQ(2.4.2)'
>>> make[1]: *** [lib/lib/libwolfssl.a] Error 2
>>>
>>>
>>>
>>> Regards,
>>> Jehanzaib
>>>
>>>
>>> On Thu, May 19, 2022 at 1:35 AM Ovidiu Sas 
>>> wrote:
>>>
>>>> Please upgrade to the latest version and see if the error persists. If
>>>> yes, please run the server in debug mode and save the logs so this issue
>>>> can be investigated properly.
>>>>
>>>> Thanks,
>>>> Ovidiu
>>>>
>>>> On Wed, May 18, 2022 at 09:02 Jehanzaib Younis <
>>>> jehanzaib.ki...@gmail.com> wrote:
>>>>
>>>>> Thank you Bogdan,
>>>>> That helped a lot. As you mentioned I need to start only with
>>>>> server_domain or client_domain.
>>>>> Now I changed my config a bit as shown below:
>>>>>  (WebRTC) Client
>>>>> modparam("tls_mgm", "server_domain", "sip.mywebphone.xx")
>>>>> modparam("tls_mgm", "certificate",
>>>>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/cert.pem")
>>>>> modparam("tls_mgm", "private_key",
>>>>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/privkey.pem")
>>>>> modparam("tls_mgm", "ca_list",
>>>>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/fullchain.pem")
>>>>> modparam("tls_mgm", "ca_dir",
>>>>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx")
>>>>> modparam("tls_mgm", "tls_method", "[sip.mywebphone.xx]SSLv23")
>>>>> modparam("tls_mgm", "verify_cert", "[sip.mywebphone.xx]1")
>>>>> modparam("tls_mgm", "require_cert", "[sip.mywebphone.xx]1")
>>>>>
>>>>> ### This is for MS-Teams direct route
>>>>> modparam("tls_mgm", "client_domain", "dom1.formsteams.com")
>>>>> modparam("tls_mgm", "certificate", "[dom1.formsteams.com
>>>>> ]/etc/letsencrypt/live/dom1.formsteams.com/cert.pem")
>>>>> modparam("tls_mgm", "private_key", "[dom1.formsteams.com
>>>>> ]/etc/letsencrypt/live/dom1.formsteams.com/pr

Re: [OpenSIPS-Users] no TLS client domain found error

2022-05-20 Thread Jehanzaib Younis
Thank you, Ovidiu.
I Just posted my logs on github.

Regards,
Jehanzaib


On Fri, May 20, 2022 at 3:02 AM Ovidiu Sas  wrote:

> Set the log_level parameter to 4 and restart opensips. Once the error
> occurs, collect all the logs from the start (from syslog) and send them to
> Razvan.
> There’s bug tracking this issue:
> https://github.com/OpenSIPS/opensips/issues/2724
>
> For compiling tls_wolfssl, try from a clean clone.
>
> -ovidiu
>
> On Thu, May 19, 2022 at 08:08 Jehanzaib Younis 
> wrote:
>
>> Thanks Ovidiu,
>> I just checked the source code, the same bug is also present in
>> the opensips-3.2.6 branch. I have another issue with 3.2.6. I am not able
>> to compile tls_wolfssl. No issue with 3.3 though.
>> Now I need to check what is causing this.
>>
>> I am getting the following error:
>>
>> make[1]: Entering directory `/usr/src/opensips-3.2/modules/tls_wolfssl'
>> configure: WARNING: unrecognized options: --disable-shared,
>> --enable-static
>> checking whether make supports nested variables... (cached) yes
>> ./configure: line 5259: syntax error near unexpected token `2.4.2'
>> ./configure: line 5259: `LT_PREREQ(2.4.2)'
>> make[1]: *** [lib/lib/libwolfssl.a] Error 2
>>
>>
>>
>> Regards,
>> Jehanzaib
>>
>>
>> On Thu, May 19, 2022 at 1:35 AM Ovidiu Sas  wrote:
>>
>>> Please upgrade to the latest version and see if the error persists. If
>>> yes, please run the server in debug mode and save the logs so this issue
>>> can be investigated properly.
>>>
>>> Thanks,
>>> Ovidiu
>>>
>>> On Wed, May 18, 2022 at 09:02 Jehanzaib Younis <
>>> jehanzaib.ki...@gmail.com> wrote:
>>>
>>>> Thank you Bogdan,
>>>> That helped a lot. As you mentioned I need to start only with
>>>> server_domain or client_domain.
>>>> Now I changed my config a bit as shown below:
>>>>  (WebRTC) Client
>>>> modparam("tls_mgm", "server_domain", "sip.mywebphone.xx")
>>>> modparam("tls_mgm", "certificate",
>>>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/cert.pem")
>>>> modparam("tls_mgm", "private_key",
>>>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/privkey.pem")
>>>> modparam("tls_mgm", "ca_list",
>>>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/fullchain.pem")
>>>> modparam("tls_mgm", "ca_dir",
>>>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx")
>>>> modparam("tls_mgm", "tls_method", "[sip.mywebphone.xx]SSLv23")
>>>> modparam("tls_mgm", "verify_cert", "[sip.mywebphone.xx]1")
>>>> modparam("tls_mgm", "require_cert", "[sip.mywebphone.xx]1")
>>>>
>>>> ### This is for MS-Teams direct route
>>>> modparam("tls_mgm", "client_domain", "dom1.formsteams.com")
>>>> modparam("tls_mgm", "certificate", "[dom1.formsteams.com
>>>> ]/etc/letsencrypt/live/dom1.formsteams.com/cert.pem")
>>>> modparam("tls_mgm", "private_key", "[dom1.formsteams.com
>>>> ]/etc/letsencrypt/live/dom1.formsteams.com/privkey.pem")
>>>> modparam("tls_mgm", "ca_list", "[dom1.formsteams.com
>>>> ]/etc/letsencrypt/live/dom1.formsteams.com/fullchain.pem")
>>>> modparam("tls_mgm", "ca_dir", "[dom1.formsteams.com
>>>> ]/etc/letsencrypt/live/dom1.formsteams.com")
>>>> modparam("tls_mgm", "tls_method", "[dom1.formsteams.com]SSLv23")
>>>> modparam("tls_mgm", "verify_cert", "[dom1.formsteams.com]1")
>>>> modparam("tls_mgm", "require_cert", "[dom1.formsteams.com]1")
>>>> modparam("tls_mgm", "client_sip_domain_avp", "tls_sip_dom")
>>>>
>>>> Looks like the initial handshake is fine when my server sends OPTIONS
>>>> to MSTeams. There is a bug in the code according to the logs as shown 
>>>> below:
>>>>
>>>> opensips[10659]: CRITICAL:core:io_watch_add: #012>>> used fd map fd=142
>>>> is not present in fd_array
>>>> (fd=142,type=19,flags=8003,data=0x7f825805ceb8)#012#012I

Re: [OpenSIPS-Users] no TLS client domain found error

2022-05-19 Thread Jehanzaib Younis
Thanks Ovidiu,
I just checked the source code, the same bug is also present in
the opensips-3.2.6 branch. I have another issue with 3.2.6. I am not able
to compile tls_wolfssl. No issue with 3.3 though.
Now I need to check what is causing this.

I am getting the following error:

make[1]: Entering directory `/usr/src/opensips-3.2/modules/tls_wolfssl'
configure: WARNING: unrecognized options: --disable-shared, --enable-static
checking whether make supports nested variables... (cached) yes
./configure: line 5259: syntax error near unexpected token `2.4.2'
./configure: line 5259: `LT_PREREQ(2.4.2)'
make[1]: *** [lib/lib/libwolfssl.a] Error 2



Regards,
Jehanzaib


On Thu, May 19, 2022 at 1:35 AM Ovidiu Sas  wrote:

> Please upgrade to the latest version and see if the error persists. If
> yes, please run the server in debug mode and save the logs so this issue
> can be investigated properly.
>
> Thanks,
> Ovidiu
>
> On Wed, May 18, 2022 at 09:02 Jehanzaib Younis 
> wrote:
>
>> Thank you Bogdan,
>> That helped a lot. As you mentioned I need to start only with
>> server_domain or client_domain.
>> Now I changed my config a bit as shown below:
>>  (WebRTC) Client
>> modparam("tls_mgm", "server_domain", "sip.mywebphone.xx")
>> modparam("tls_mgm", "certificate",
>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/cert.pem")
>> modparam("tls_mgm", "private_key",
>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/privkey.pem")
>> modparam("tls_mgm", "ca_list",
>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/fullchain.pem")
>> modparam("tls_mgm", "ca_dir",
>> "[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx")
>> modparam("tls_mgm", "tls_method", "[sip.mywebphone.xx]SSLv23")
>> modparam("tls_mgm", "verify_cert", "[sip.mywebphone.xx]1")
>> modparam("tls_mgm", "require_cert", "[sip.mywebphone.xx]1")
>>
>> ### This is for MS-Teams direct route
>> modparam("tls_mgm", "client_domain", "dom1.formsteams.com")
>> modparam("tls_mgm", "certificate", "[dom1.formsteams.com
>> ]/etc/letsencrypt/live/dom1.formsteams.com/cert.pem")
>> modparam("tls_mgm", "private_key", "[dom1.formsteams.com
>> ]/etc/letsencrypt/live/dom1.formsteams.com/privkey.pem")
>> modparam("tls_mgm", "ca_list", "[dom1.formsteams.com
>> ]/etc/letsencrypt/live/dom1.formsteams.com/fullchain.pem")
>> modparam("tls_mgm", "ca_dir", "[dom1.formsteams.com
>> ]/etc/letsencrypt/live/dom1.formsteams.com")
>> modparam("tls_mgm", "tls_method", "[dom1.formsteams.com]SSLv23")
>> modparam("tls_mgm", "verify_cert", "[dom1.formsteams.com]1")
>> modparam("tls_mgm", "require_cert", "[dom1.formsteams.com]1")
>> modparam("tls_mgm", "client_sip_domain_avp", "tls_sip_dom")
>>
>> Looks like the initial handshake is fine when my server sends OPTIONS to
>> MSTeams. There is a bug in the code according to the logs as shown below:
>>
>> opensips[10659]: CRITICAL:core:io_watch_add: #012>>> used fd map fd=142
>> is not present in fd_array
>> (fd=142,type=19,flags=8003,data=0x7f825805ceb8)#012#012It seems you
>> have hit a programming bug.#012Please help us make OpenSIPS better by
>> reporting it at https://github.com/OpenSIPS/opensips/issues
>> opensips[10659]: CRITICAL:core:io_watch_add: [TCP_main] check failed
>> after successful fd add (fd=141,type=19,data=0x7f825804fd98,flags=1)
>> already=0
>> opensips[23993]: NOTICE:tls_wolfssl:verify_callback: depth = 1, verify
>> success
>> opensips[23993]: NOTICE:tls_wolfssl:verify_callback: depth = 0, verify
>> success
>> opensips[23993]: INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS
>> connection to 52.114.16.74:5061 established
>> opensips[23993]: NOTICE:tls_wolfssl:verify_callback: depth = 1, verify
>> success
>> opensips[23993]: NOTICE:tls_wolfssl:verify_callback: depth = 0, verify
>> success
>> opensips[23995]: INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS
>> connection to 52.114.76.76:5061 established
>>
>>
>> Regards,
>> Jehanzaib
>>
>>
>> On Wed, May 18, 2022 at 6:15 PM Bogdan-Andrei Iancu 
>> wrote:
>>
>>> Hi Jehanzaib,
>>>

Re: [OpenSIPS-Users] no TLS client domain found error

2022-05-18 Thread Jehanzaib Younis
Thank you Bogdan,
That helped a lot. As you mentioned I need to start only with server_domain
or client_domain.
Now I changed my config a bit as shown below:
 (WebRTC) Client
modparam("tls_mgm", "server_domain", "sip.mywebphone.xx")
modparam("tls_mgm", "certificate",
"[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/cert.pem")
modparam("tls_mgm", "private_key",
"[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/privkey.pem")
modparam("tls_mgm", "ca_list",
"[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/fullchain.pem")
modparam("tls_mgm", "ca_dir",
"[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx")
modparam("tls_mgm", "tls_method", "[sip.mywebphone.xx]SSLv23")
modparam("tls_mgm", "verify_cert", "[sip.mywebphone.xx]1")
modparam("tls_mgm", "require_cert", "[sip.mywebphone.xx]1")

### This is for MS-Teams direct route
modparam("tls_mgm", "client_domain", "dom1.formsteams.com")
modparam("tls_mgm", "certificate", "[dom1.formsteams.com
]/etc/letsencrypt/live/dom1.formsteams.com/cert.pem")
modparam("tls_mgm", "private_key", "[dom1.formsteams.com
]/etc/letsencrypt/live/dom1.formsteams.com/privkey.pem")
modparam("tls_mgm", "ca_list", "[dom1.formsteams.com]/etc/letsencrypt/live/
dom1.formsteams.com/fullchain.pem")
modparam("tls_mgm", "ca_dir", "[dom1.formsteams.com]/etc/letsencrypt/live/
dom1.formsteams.com")
modparam("tls_mgm", "tls_method", "[dom1.formsteams.com]SSLv23")
modparam("tls_mgm", "verify_cert", "[dom1.formsteams.com]1")
modparam("tls_mgm", "require_cert", "[dom1.formsteams.com]1")
modparam("tls_mgm", "client_sip_domain_avp", "tls_sip_dom")

Looks like the initial handshake is fine when my server sends OPTIONS to
MSTeams. There is a bug in the code according to the logs as shown below:

opensips[10659]: CRITICAL:core:io_watch_add: #012>>> used fd map fd=142 is
not present in fd_array
(fd=142,type=19,flags=8003,data=0x7f825805ceb8)#012#012It seems you
have hit a programming bug.#012Please help us make OpenSIPS better by
reporting it at https://github.com/OpenSIPS/opensips/issues
opensips[10659]: CRITICAL:core:io_watch_add: [TCP_main] check failed after
successful fd add (fd=141,type=19,data=0x7f825804fd98,flags=1) already=0
opensips[23993]: NOTICE:tls_wolfssl:verify_callback: depth = 1, verify
success
opensips[23993]: NOTICE:tls_wolfssl:verify_callback: depth = 0, verify
success
opensips[23993]: INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS
connection to 52.114.16.74:5061 established
opensips[23993]: NOTICE:tls_wolfssl:verify_callback: depth = 1, verify
success
opensips[23993]: NOTICE:tls_wolfssl:verify_callback: depth = 0, verify
success
opensips[23995]: INFO:tls_wolfssl:_wolfssl_tls_async_connect: new TLS
connection to 52.114.76.76:5061 established


Regards,
Jehanzaib


On Wed, May 18, 2022 at 6:15 PM Bogdan-Andrei Iancu 
wrote:

> Hi Jehanzaib,
>
> The sequence for the MST TLS domains is wrong.
>
> For each TLS domain block, you need to start only with a server_domain or
> client_domain - of course, different names. And for each domain you need
> you set the matching conditions. See
> https://opensips.org/html/docs/modules/3.2.x/tls_mgm.html#domains-param
>
> Basically something like:
>
> modparam("tls_mgm", "server_domain", "formsteams_server")
> modparam("tls_mgm", "match_ip_address", "[formsteams_server]")
> modparam("tls_mgm", "match_sip_domain", "[formsteams_server]")
> modparam("tls_mgm", "certificate", "[formsteams_server].)
> 
>
>
> modparam("tls_mgm", "client_domain", "formsteams_client")
> modparam("tls_mgm", "match_ip_address", "[formsteams_client]")
> modparam("tls_mgm", "match_sip_domain", "[formsteams_client]")
> modparam("tls_mgm", "certificate", "[formsteams_client].)
> 
>
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp 23rd May - 3rd June 2022
>   https://opensips.org/training/OpenSIPS_eBootcamp_2022/
>
> On 5/18/22 2:38 AM, Jehanzaib Younis wrote:
>
> Hi Bogdan,
> That's the problem, when I try to add the client_domain I get an error.
> Actually, I have a wo

Re: [OpenSIPS-Users] How to use old "opensipsctl avp add" with opensips-cli?

2022-05-18 Thread Jehanzaib Younis
Hi Bela,
I think you can use (opensips-cli): database add avp command


Regards,
Jehanzaib


On Wed, May 18, 2022 at 6:20 PM Bela H  wrote:

> Hello,
>
> I want to set up a call forwarding and followed the instructions from the
> "Building telephony systems with OpenSIPS". However, this is a little bit
> outdated, the old opensipsctl was replaced by opensips-cli. How can I add
> an avp data into a usr_preferences table from opensips-cli?
> This was the old format: *opensipsctl avp add A_number callfwd 0 C_number*
>
> Cheers,
> Bela
> ___
> 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] no TLS client domain found error

2022-05-17 Thread Jehanzaib Younis
Hi Bogdan,
That's the problem, when I try to add the client_domain I get an error.
Actually, I have a working config for webrtc but now I am adding a new
domain for MS teams direct route. In fact, any other domain gives an error.
If I disable MS Teams domain, the opensips do not give an error message and
my webrtc client can connect without any issue.

loadmodule "tls_mgm.so"
modparam("tls_mgm", "tls_library", "wolfssl")

 (WebRTC) Client
modparam("tls_mgm", "server_domain", "sip.mywebphone.xx")
modparam("tls_mgm", "certificate",
"[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/cert.pem")
modparam("tls_mgm", "private_key",
"[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/privkey.pem")
modparam("tls_mgm", "ca_list",
"[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx/fullchain.pem")
modparam("tls_mgm", "ca_dir",
"[sip.mywebphone.xx]/etc/letsencrypt/live/sip.mywebphone.xx")
modparam("tls_mgm", "tls_method", "[sip.mywebphone.xx]SSLv23")
modparam("tls_mgm", "verify_cert", "[sip.mywebphone.xx]1")
modparam("tls_mgm", "require_cert", "[sip.mywebphone.xx]1")

### This is for MS-Teams direct route
modparam("tls_mgm", "server_domain", "dom1.formsteams.com")
modparam("tls_mgm", "client_domain", "dom1.formsteams.com")
modparam("tls_mgm", "certificate", "[dom1.formsteams.com
]/etc/letsencrypt/live/dom1.formsteams.com/cert.pem")
modparam("tls_mgm", "private_key", "[dom1.formsteams.com
]/etc/letsencrypt/live/dom1.formsteams.com/privkey.pem")
modparam("tls_mgm", "ca_list", "[dom1.formsteams.com]/etc/letsencrypt/live/
dom1.formsteams.com/fullchain.pem")
modparam("tls_mgm", "ca_dir", "[dom1.formsteams.com]/etc/letsencrypt/live/
dom1.formsteams.com")
modparam("tls_mgm", "tls_method", "[dom1.formsteams.com]SSLv23")
modparam("tls_mgm", "verify_cert", "[dom1.formsteams.com]1")
modparam("tls_mgm", "require_cert", "[dom1.formsteams.com]1")
modparam("tls_mgm", "client_sip_domain_avp", "tls_sip_dom")

When i enable the MS-Teams direct route domain i get the below error:
no certificate for tls domain ' dom1.formsteams.com ' defined


Regards,
Jehanzaib


On Wed, May 18, 2022 at 3:04 AM Bogdan-Andrei Iancu 
wrote:

> Hi Jehanzaib,
>
> What are the TLS client domains you have defined in your tls_mgm module ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp 23rd May - 3rd June 2022
>   https://opensips.org/training/OpenSIPS_eBootcamp_2022/
>
> On 5/17/22 4:32 PM, Jehanzaib Younis wrote:
>
> Hi,
>
> I am having trouble to send/receive OPTIONS to ms teams.
> Using the dispatcher module. The socket is defined as tls:*mysbcip*:5061
> Looks like when my opensips (3.2.x) tries to send OPTIONS. it is giving me
> the following error
>
> ERROR:proto_tls:proto_tls_conn_init: no TLS client domain found
> ERROR:core:tcp_conn_create: failed to do proto 3 specific init for conn
> 0x7f00ef2a85a0
> ERROR:core:tcp_async_connect: tcp_conn_create failed
> ERROR:proto_tls:proto_tls_send: async TCP connect failed
> ERROR:tm:msg_send: send() to 52.114.76.76:5061 for proto tls/3 failed
> ERROR:tm:t_uac: attempt to send to '
> sip:sip3.pstnhub.microsoft.com:5061;transport:tls' failed
>
> I am setting the Contact as 
>
> Looks like the client domain is used for outgoing TLS connection but no
> idea which domain i need to add here. The socket is my opensips ip address.
>
> Has anyone seen a similar kind of behaviour?
>
> Thank you.
>
> Regards,
> Jehanzaib
>
> ___
> 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


[OpenSIPS-Users] no TLS client domain found error

2022-05-17 Thread Jehanzaib Younis
Hi,

I am having trouble to send/receive OPTIONS to ms teams.
Using the dispatcher module. The socket is defined as tls:*mysbcip*:5061
Looks like when my opensips (3.2.x) tries to send OPTIONS. it is giving me
the following error

ERROR:proto_tls:proto_tls_conn_init: no TLS client domain found
ERROR:core:tcp_conn_create: failed to do proto 3 specific init for conn
0x7f00ef2a85a0
ERROR:core:tcp_async_connect: tcp_conn_create failed
ERROR:proto_tls:proto_tls_send: async TCP connect failed
ERROR:tm:msg_send: send() to 52.114.76.76:5061 for proto tls/3 failed
ERROR:tm:t_uac: attempt to send to
'sip:sip3.pstnhub.microsoft.com:5061;transport:tls'
failed

I am setting the Contact as 

Looks like the client domain is used for outgoing TLS connection but no
idea which domain i need to add here. The socket is my opensips ip address.

Has anyone seen a similar kind of behaviour?

Thank you.

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


Re: [OpenSIPS-Users] Maximum number of ReINVITEs option?

2022-05-14 Thread Jehanzaib Younis
Hi Ray,

I did not see any built-in way to restrict the number of re-invites. The
problem with this buggy client is, if your SBC does not respond the
client's reinvite. It might send BYE ;) so even if you restrict the
reinvites that might not work well.


Regards,
Jehan


On Sat, May 14, 2022 at 5:06 PM Ray Jackson  wrote:

> Correct, Max-Forwards stays the same on each ReINVITE and the CSeq
> increments by 1 each time.  All other headers stay the same. I have no idea
> what is broken with the client to continually ReINVITE in a loop.  We
> accept the ReINVITE with an OK and we receive an ACK back and then
> immediately another INVITE and so it goes on until the call is terminated.
>
> I'm less interested in working out what is broken on the client end and
> more interested in protecting our network.
>
> Thanks,
>
> Ray
> On 14/05/22 2:59 pm, Jehanzaib Younis wrote:
>
> Hi Ray,
>
> I assume the Max-Forwards remains same but the CSeq is increasing ya?
>
> Regards,
> Jehan
>
>
> On Sat, May 14, 2022 at 2:42 PM Ray Jackson  wrote:
>
>> Hi all,
>>
>> I have a misbehaving SIP client which is repeatedly sending SIP ReINVITE
>> messages over and over again (in the hundreds) and want to enforce a
>> limit on the number of ReINVITE messages per Call to stop this in it's
>> tracks.  The CSeq is incrementing on each ReINVITE.
>>
>> Are there any config settings to limit the number of ReINVITEs on a
>> single Call/Dialog?  I was going to possibly keep a count of the INVITEs
>> using a cache variable based on the Unique CallID but wanted to check
>> first there wasn't a simpler (built-in) way of doing this?
>>
>> Thanks,
>> Ray
>>
>>
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> --
> Ray Jackson
> Chief Technology Officer [image: Logo] <https://hero.co.nz>
>
> Hero Internet
> Level 4, 220 Queen Street
> Auckland
> t: +649-242-0001
> e: r...@hero.co.nz
>
> hero.co.nz [image: Facebook icon]
> <https://www.facebook.com/herointernetnz>[image: Twitter icon]
> <https://twitter.com/herointernetnz/>
> ___
> 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] Maximum number of ReINVITEs option?

2022-05-13 Thread Jehanzaib Younis
Hi Ray,

I assume the Max-Forwards remains same but the CSeq is increasing ya?

Regards,
Jehan


On Sat, May 14, 2022 at 2:42 PM Ray Jackson  wrote:

> Hi all,
>
> I have a misbehaving SIP client which is repeatedly sending SIP ReINVITE
> messages over and over again (in the hundreds) and want to enforce a
> limit on the number of ReINVITE messages per Call to stop this in it's
> tracks.  The CSeq is incrementing on each ReINVITE.
>
> Are there any config settings to limit the number of ReINVITEs on a
> single Call/Dialog?  I was going to possibly keep a count of the INVITEs
> using a cache variable based on the Unique CallID but wanted to check
> first there wasn't a simpler (built-in) way of doing this?
>
> Thanks,
> Ray
>
>
>
>
> ___
> 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] wolfssl setup

2022-02-25 Thread Jehanzaib Younis
Thank you for your help, I made it work. Just need to test with different
clients.
This forum is a true blessing.

Regards,
Jehanzaib


On Thu, Feb 24, 2022 at 2:37 AM Ovidiu Sas  wrote:

> Also, the match_sip_domain parameter has an extra space.
>
> -ovidiu
>
> On Wed, Feb 23, 2022 at 06:54 Bogdan-Andrei Iancu 
> wrote:
>
>> Hi Jehanzaib,
>>
>> See
>> https://opensips.org/html/docs/modules/3.2.x/tls_mgm.html#domains-param
>> for some samples, as you are missing the TLS domain name in the value of
>> the parameter.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS eBootcamp
>>   https://www.opensips.org/Training/Bootcamp
>>
>> On 2/23/22 9:17 AM, Jehanzaib Younis wrote:
>>
>> Thank you for your response.
>> yes that is what i did but i am getting a couple of errors as shown below:
>>
>> Feb 23 02:14:17  opensips: ERROR:tls_mgm:split_param_val: No TLS domain
>> name
>> Feb 23 02:14:17  opensips: Traceback (last included file at the bottom):
>> Feb 23 02:14:17  opensips: 0. /usr/local//etc/opensips/opensips.cfg
>> Feb 23 02:14:17  opensips: CRITICAL:core:yyerror: parse error in
>> /usr/local//etc/opensips/opensips.cfg:122:20-21: Parameter
>>  not found in module  - can't set
>>
>> My config is
>>
>> loadmodule "proto_tls.so"
>> loadmodule "tls_wolfssl.so"
>> loadmodule "tls_mgm.so"
>> modparam("tls_mgm", "tls_library", "wolfssl")
>> modparam("tls_mgm", "server_domain", "mysipxx.com")
>> modparam("tls_mgm", "match_sip_domain", "mysipxx.com  ")
>> modparam("tls_mgm", "certificate", "/etc/letsencrypt/live/mysipxx.com
>> /cert.pem")
>> modparam("tls_mgm", "private_key", "/etc/letsencrypt/live/mysipxx.com
>> /privkey.pem")
>> modparam("tls_mgm", "ca_list", "/etc/letsencrypt/live/mysipxx.com
>> /fullchain.pem")
>>
>> Regards,
>> Jehanzaib
>>
>>
>> On Wed, Feb 23, 2022 at 7:00 PM Ovidiu Sas  wrote:
>>
>>> What exactly is the issue?
>>> You can load both libraries and switch between them via the
>>> tls_library param of tls_mgm module:
>>> loadmodule "tls_openssl.so"
>>> loadmodule "tls_wolfssl.so"
>>> loadmodule "tls_mgm.so"
>>> # modparam("tls_mgm", "tls_library", "openssl")
>>>   modparam("tls_mgm", "tls_library", "wolfssl")
>>>
>>> -ovidiu
>>>
>>> On Tue, Feb 22, 2022 at 9:57 PM Jehanzaib Younis
>>>  wrote:
>>> >
>>> > Hi,
>>> >
>>> > Does anyone have a working example with tls_wolfssl ? I was able to
>>> work with tls_openssl but i am try to test with wolfssl library and having
>>> a hard time at the moment ;)
>>> >
>>> >
>>> > Thank you.
>>> > ___
>>> > 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
>>>
>>
>> ___
>> 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
>>
> --
> VoIP Embedded, Inc.
> http://www.voipembedded.com
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] wolfssl setup

2022-02-23 Thread Jehanzaib Younis
I am running opensips 3.3.0 version.
I have also changed the format and now the error is bit different.

i tried server_domain like modparam("tls_mgm", "server_domain", "[
mysipxx.com]")
Now the error is ERROR:tls_mgm:tlsp_set_match_addr: TLS domain [ mysipxx.com
] not defined

Does anyone know where to define this TLS domain? i have already set

Regards,
Jehanzaib


On Wed, Feb 23, 2022 at 8:17 PM Jehanzaib Younis 
wrote:

> Thank you for your response.
> yes that is what i did but i am getting a couple of errors as shown below:
>
> Feb 23 02:14:17  opensips: ERROR:tls_mgm:split_param_val: No TLS domain
> name
> Feb 23 02:14:17  opensips: Traceback (last included file at the bottom):
> Feb 23 02:14:17  opensips: 0. /usr/local//etc/opensips/opensips.cfg
> Feb 23 02:14:17  opensips: CRITICAL:core:yyerror: parse error in
> /usr/local//etc/opensips/opensips.cfg:122:20-21: Parameter
>  not found in module  - can't set
>
> My config is
>
> loadmodule "proto_tls.so"
> loadmodule "tls_wolfssl.so"
> loadmodule "tls_mgm.so"
> modparam("tls_mgm", "tls_library", "wolfssl")
> modparam("tls_mgm", "server_domain", "mysipxx.com")
> modparam("tls_mgm", "match_sip_domain", "mysipxx.com  ")
> modparam("tls_mgm", "certificate", "/etc/letsencrypt/live/mysipxx.com
> /cert.pem")
> modparam("tls_mgm", "private_key", "/etc/letsencrypt/live/mysipxx.com
> /privkey.pem")
> modparam("tls_mgm", "ca_list", "/etc/letsencrypt/live/mysipxx.com
> /fullchain.pem")
>
> Regards,
> Jehanzaib
>
>
> On Wed, Feb 23, 2022 at 7:00 PM Ovidiu Sas  wrote:
>
>> What exactly is the issue?
>> You can load both libraries and switch between them via the
>> tls_library param of tls_mgm module:
>> loadmodule "tls_openssl.so"
>> loadmodule "tls_wolfssl.so"
>> loadmodule "tls_mgm.so"
>> # modparam("tls_mgm", "tls_library", "openssl")
>>   modparam("tls_mgm", "tls_library", "wolfssl")
>>
>> -ovidiu
>>
>> On Tue, Feb 22, 2022 at 9:57 PM Jehanzaib Younis
>>  wrote:
>> >
>> > Hi,
>> >
>> > Does anyone have a working example with tls_wolfssl ? I was able to
>> work with tls_openssl but i am try to test with wolfssl library and having
>> a hard time at the moment ;)
>> >
>> >
>> > Thank you.
>> > ___
>> > 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
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] wolfssl setup

2022-02-22 Thread Jehanzaib Younis
Thank you for your response.
yes that is what i did but i am getting a couple of errors as shown below:

Feb 23 02:14:17  opensips: ERROR:tls_mgm:split_param_val: No TLS domain name
Feb 23 02:14:17  opensips: Traceback (last included file at the bottom):
Feb 23 02:14:17  opensips: 0. /usr/local//etc/opensips/opensips.cfg
Feb 23 02:14:17  opensips: CRITICAL:core:yyerror: parse error in
/usr/local//etc/opensips/opensips.cfg:122:20-21: Parameter
 not found in module  - can't set

My config is

loadmodule "proto_tls.so"
loadmodule "tls_wolfssl.so"
loadmodule "tls_mgm.so"
modparam("tls_mgm", "tls_library", "wolfssl")
modparam("tls_mgm", "server_domain", "mysipxx.com")
modparam("tls_mgm", "match_sip_domain", "mysipxx.com  ")
modparam("tls_mgm", "certificate", "/etc/letsencrypt/live/mysipxx.com
/cert.pem")
modparam("tls_mgm", "private_key", "/etc/letsencrypt/live/mysipxx.com
/privkey.pem")
modparam("tls_mgm", "ca_list", "/etc/letsencrypt/live/mysipxx.com
/fullchain.pem")

Regards,
Jehanzaib


On Wed, Feb 23, 2022 at 7:00 PM Ovidiu Sas  wrote:

> What exactly is the issue?
> You can load both libraries and switch between them via the
> tls_library param of tls_mgm module:
> loadmodule "tls_openssl.so"
> loadmodule "tls_wolfssl.so"
> loadmodule "tls_mgm.so"
> # modparam("tls_mgm", "tls_library", "openssl")
>   modparam("tls_mgm", "tls_library", "wolfssl")
>
> -ovidiu
>
> On Tue, Feb 22, 2022 at 9:57 PM Jehanzaib Younis
>  wrote:
> >
> > Hi,
> >
> > Does anyone have a working example with tls_wolfssl ? I was able to work
> with tls_openssl but i am try to test with wolfssl library and having a
> hard time at the moment ;)
> >
> >
> > Thank you.
> > ___
> > 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] wolfssl setup

2022-02-22 Thread Jehanzaib Younis
Hi,

Does anyone have a working example with tls_wolfssl ? I was able to work
with tls_openssl but i am try to test with wolfssl library and having a
hard time at the moment ;)


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


Re: [OpenSIPS-Users] Selective International Call Blocking

2021-12-14 Thread Jehanzaib Younis
Hi Mike,

I used to save all the blocked international prefixes in the local cache
and then you can check in the INVITE section.
If it matches, just drop the packet.


Regards,
Jehan


On Wed, Dec 15, 2021 at 11:44 AM Mike O'Connor  wrote:

> Hi All
>
> I'm working with a company running an old version of OpenSIPS (1.6.4),
> who need to selectively block international calls. What was the
> recommended method doing this back then?
>
> I've been contracted to upgrade the whole system to current version of
> everything but that is going to take time.
>
> Thanks
>
> Mike
>
>
> ___
> 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] TLS Handshake fail issue

2021-11-22 Thread Jehanzaib Younis
Looks like the domain name you are using is not matching with the
certificate name.
I have also noticed you are using tlsv1, better to generate the certificate
with tlsv1.2 or tlsv1.3


Regards,
Jehanzaib


On Tue, Nov 23, 2021 at 1:58 AM Devang Dhandhalya <
devang.dhandha...@ecosmob.com> wrote:

> Hello vlad
>
> Thanks for your response ,I used this command to check connection :openssl
> s_client -showcerts -debug -connect 192.168.0.105:5071 -bugs .
> Please let me know if there are any other commands to  check .
>
> CONNECTED(0005)
> write to 0x561a52aa46b0 [0x561a52ab4eb0] (517 bytes => 517 (0x205))
> 140663188505024:error:14094458:SSL routines:ssl3_read_bytes:tlsv1
> unrecognized name:../ssl/record/rec_layer_s3.c:1528:SSL alert number 112
> ---
> no peer certificate available
> ---
> No client certificate CA names sent
> ---
> SSL handshake has read 7 bytes and written 517 bytes
> Verification: OK
> ---
> New, (NONE), Cipher is (NONE)
> Secure Renegotiation IS NOT supported
> Compression: NONE
> Expansion: NONE
> No ALPN negotiated
> Early data was not sent
> Verify return code: 0 (ok)
> ---
>
> In this TLS  connection i am getting one error :
> 140663188505024:error:14094458:SSL routines:ssl3_read_bytes:tlsv1
> unrecognized name:../ssl/record/rec_layer_s3.c:1528:SSL alert number 112
>
> Can you please give some suggestions on this .
>
> OpenSIPS starts successfully without errors and the following command
> shows listening on the correct port:
> netstat -tapen | grep 5071
> tcp0  0 192.168.0.105:5071  0.0.0.0:*
> LISTEN  0  87130  9179/opensips
>
> I made some changes in the tls configuration . other than this same as
> before .
>
> socket=udp:192.168.0.105:5060 as devang.com:5060
> socket=tcp:192.168.0.105:5060 as devang.com:5060
> socket=tls:192.168.0.105:5071 as devang.com:5071
>
> modparam("tls_mgm", "match_ip_address", "[dom1]1.2.3.4:5071")
>
>
> At the time of calling, I get this error .
>
> ERROR:tls_openssl:openssl_tls_async_connect: New TLS connection to
> 192.168.0.105:44853 failed
> ERROR:tls_openssl:openssl_tls_async_connect: TLS error: 1 (ret=-1)
> err=Success(0)
> ERROR:tls_openssl:tls_print_errstack: TLS errstack: error:14094410:SSL
> routines:ssl3_read_bytes:sslv3 alert handshake failure
> ERROR:proto_tls:tls_read_req: failed to do pre-tls handshake!
>
> I tried setting all the tls version methods as 'tls_method' in opensips
> config but the same error occurred.  Please advise how to resolve this
> SSL23 handshake failure.
>
> Regards
> Devang Dhandhalya
>
> *Disclaimer*
> In addition to generic Disclaimer which you have agreed on our website,
> any views or opinions presented in this email are solely those of the
> originator and do not necessarily represent those of the Company or its
> sister concerns. Any liability (in negligence, contract or otherwise)
> arising from any third party taking any action, or refraining from taking
> any action on the basis of any of the information contained in this email
> is hereby excluded.
>
> *Confidentiality*
> This communication (including any attachment/s) is intended only for the
> use of the addressee(s) and contains information that is PRIVILEGED AND
> CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying
> of this communication is prohibited. Please inform originator if you have
> received it in error.
>
> *Caution for viruses, malware etc.*
> This communication, including any attachments, may not be free of viruses,
> trojans, similar or new contaminants/malware, interceptions or
> interference, and may not be compatible with your systems. You shall carry
> out virus/malware scanning on your own before opening any attachment to
> this e-mail. The sender of this e-mail and Company including its sister
> concerns shall not be liable for any damage that may incur to you as a
> result of viruses, incompleteness of this message, a delay in receipt of
> this message or any other computer problems.
> ___
> 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] Syntax in 3.2

2021-11-19 Thread Jehanzaib Younis
Thank you so much Bogdan,


Regards,
Jehanzaib


On Fri, Nov 19, 2021 at 8:13 PM Bogdan-Andrei Iancu 
wrote:

> Hi Jehanzaib,
>
> the "status" keyword was dropped for a long time [1], use $rs instead.
>
> [1] https://www.opensips.org/Documentation/Migration-2-3-0-to-2-4-0#toc4
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp 2021
>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>
> On 11/19/21 6:04 AM, Jehanzaib Younis wrote:
>
> Hi experts,
>
> I have just upgraded my old opensips to 3.2 version. Getting quite a few
> syntax errors. Running out of time, so thought maybe someone can quickly
> help out .
>
> The error comes at if(status=~"[12][0-9][0-9]")
> May be someone can write us the correct syntax for status code checking?
>
> Thank you in advance
>
> Regards,
> Jehanzaib
>
> ___
> 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


[OpenSIPS-Users] Syntax in 3.2

2021-11-18 Thread Jehanzaib Younis
Hi experts,

I have just upgraded my old opensips to 3.2 version. Getting quite a few
syntax errors. Running out of time, so thought maybe someone can quickly
help out .

The error comes at if(status=~"[12][0-9][0-9]")
May be someone can write us the correct syntax for status code checking?

Thank you in advance

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


[OpenSIPS-Users] Search and Replace SIP header name

2021-08-01 Thread Jehanzaib Younis
Hi experts,

I am running opensips 2.4.x  just checkin if there is a way to replace the
SIP header name?
I can see the remove_hf in the sipmsgops module but can't find a way to
replace the sip header name.
For example i have a header
H-ABC: 
i want to replace H-ABC to H-NEWABC


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


Re: [OpenSIPS-Users] Contact header in the dispatcher OPTIONS

2021-06-09 Thread Jehanzaib Younis
Thank you ovidiu nd Mark,
I can add the Contact header in the local route.

Regards,
Jehanzaib


On Wed, Jun 9, 2021 at 11:11 PM Mark Farmer  wrote:

> The Contact header is optional in an OPTIONS message so the module
> probably doesn't add it.
>
> The link provided provides you with the solution regardless of carrier.
>
> Mark.
>
>
> On Wed, 9 Jun 2021 at 02:48, Jehanzaib Younis 
> wrote:
>
>> Thank you for sending me the link but I am not trying to integrate with
>> MS teams.
>> The Dispatcher sends the OPTIONS without Contact to my carrier and my
>> carrier does not like it. I just want to add Contact header in the
>> dispatchers OPTIONS.
>>
>>
>> Regards,
>> Jehanzaib
>>
>>
>> On Wed, Jun 9, 2021 at 1:19 PM Ovidiu Sas  wrote:
>>
>>> It seems that you are trying to integrate with MS.
>>> Check this blog, you have your answer there:
>>> https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/
>>>
>>> -ovidiu
>>>
>>>
>>> On Tue, Jun 8, 2021 at 20:52 Jehanzaib Younis 
>>> wrote:
>>>
>>>> Hi folks,
>>>> I have opensips 2.4.x.
>>>> I am using the dispatcher module. I can not see the Contact header in
>>>> the OPTIONS to the destination, is there any way we can add the contact
>>>> header?
>>>>
>>>> Thank you
>>>>
>>>> Regards,
>>>> Jehanzaib
>>>> ___
>>>> 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
>>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> --
> Mark Farmer
> farm...@gmail.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] Contact header in the dispatcher OPTIONS

2021-06-08 Thread Jehanzaib Younis
Thank you for sending me the link but I am not trying to integrate with MS
teams.
The Dispatcher sends the OPTIONS without Contact to my carrier and my
carrier does not like it. I just want to add Contact header in the
dispatchers OPTIONS.


Regards,
Jehanzaib


On Wed, Jun 9, 2021 at 1:19 PM Ovidiu Sas  wrote:

> It seems that you are trying to integrate with MS.
> Check this blog, you have your answer there:
> https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/
>
> -ovidiu
>
>
> On Tue, Jun 8, 2021 at 20:52 Jehanzaib Younis 
> wrote:
>
>> Hi folks,
>> I have opensips 2.4.x.
>> I am using the dispatcher module. I can not see the Contact header in the
>> OPTIONS to the destination, is there any way we can add the contact header?
>>
>> Thank you
>>
>> Regards,
>> Jehanzaib
>> ___
>> 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Contact header in the dispatcher OPTIONS

2021-06-08 Thread Jehanzaib Younis
Hi folks,
I have opensips 2.4.x.
I am using the dispatcher module. I can not see the Contact header in the
OPTIONS to the destination, is there any way we can add the contact header?

Thank you

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


Re: [OpenSIPS-Users] Limit Call per Second

2021-01-20 Thread Jehanzaib Younis
Hi Alex,

You can save the data from your database to memory and fetch it during all
control. I will not recommend to use db directly. There might be any other
better way someone from the community can tell us ;)


Regards,
Jehanzaib


On Thu, Jan 21, 2021 at 4:01 PM Alexander Perkins <
alexanderhenryperk...@gmail.com> wrote:

> Hi All.  Is there a way to limit the calls per second by pulling the
> information from a database? I was looking at the call_control module and
> that seems to be a global value. but I would need something that I can
> control at the call level (I will be handling different accounts that have
> different limits).
>
> Thanks, All.  Any help is appreciated.
>
> Alex
> ___
> 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] Public IP in REGISTER

2020-03-12 Thread Jehanzaib Younis
Ohh ya. I have just disabled  nat_traversal and removed nat_keepalive();
Need to add the bflag properly which actually fixed my issue.

Thank your help!



On Wed, Mar 11, 2020 at 6:59 PM Liviu Chircu  wrote:

> On 09.03.2020 02:24, Jehanzaib Younis wrote:
> >   if (is_method("REGISTER")) {
> > fix_nated_register();
> > nat_keepalive();
>
> Hi, Jehanzaib!
>
> Bingo!  This is the cause of your strange double-pinging. You are using
> two NAT pinging modules at the same time: nathelper + nat_traversal.
> And, of course, nat_traversal will keep on pinging the old value until
> its "virtual expiration" timer kicks in, ignoring the fact that the
> contact actually got refreshed within the user location by a new
> binding, xx.xxx.xx.xx:25004.
>
> Possible solutions:
>
> * stop using nat_traversal
> * stop using nathelper
> * keep using them both, but be careful not to arm them simultaneously
> (can be tricky)
>
> Regards,
>
> --
> Liviu Chircu
> www.twitter.com/liviuchircu | www.opensips-solutions.com
>
> OpenSIPS Summit, Amsterdam, May 2020
>www.opensips.org/events
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


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


Re: [OpenSIPS-Users] Public IP in REGISTER

2020-03-09 Thread Jehanzaib Younis
i do
if(isflagset(8))
{
setbflag(3);
setbflag(NAT);
setbflag(7);
}
   save("location");
   exit;

I have modparam("usrloc", "nat_bflag", "NAT")  & modparam("nathelper",
"sipping_bflag", 7)

I also use this when i see its behind NAT
if (is_method("REGISTER")) {
fix_nated_register();
nat_keepalive();
setbflag(3);# Mark as NATed
setbflag(NAT);
  }

On Mon, Mar 9, 2020 at 12:56 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Have you tried setting the bflag right before save()’ing during the
> REGISTER?
>
> On Sun, 8 Mar 2020 at 23:34, Jehanzaib Younis 
> wrote:
>
>> Hi David,
>>
>> I have one contact in the Usrloc
>> Do you think it could be a timeout issue? or i should use
>> remove_on_timeout_bflag option?
>>
>> On Mon, Mar 9, 2020 at 12:31 PM David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>>
>>> Make sure you don’t have 2 contacts
>>>
>>> On Sun, 8 Mar 2020 at 23:22, Jehanzaib Younis 
>>> wrote:
>>>
>>>> but i have strange issue.
>>>> nathelper keep on sending the OPTION to old IP:PORT. As soon as the new
>>>> REGISTER comes in, it should only send the option to the latest one.
>>>> For example, I see OPTION going to xx.xxx.xx.xx:25001 and opensips keep
>>>> on sending to this after every 120 seconds (which is my setting)
>>>> The new register comes in and the  xx.xxx.xx.xx:25004 letsay and now
>>>> opensips sends to 25001 as well as 25004. Obviously my cpe only replies to
>>>> the latest one.
>>>>
>>>> Anyone have faced this issue ?
>>>>
>>>> Thank you
>>>>
>>>> On Fri, Mar 6, 2020 at 2:54 PM Jehanzaib Younis <
>>>> jehanzaib.ki...@gmail.com> wrote:
>>>>
>>>>> Thank you for your suggestions Diptesh,
>>>>>
>>>>> Actually adding modparam("nathelper", "received_avp", "$avp(s:rcv)") &
>>>>> modparam("registrar", "received_avp", "$avp(s:rcv)") did the trick.
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Mar 5, 2020 at 7:25 PM Dipteshkumar Patel <
>>>>> diptesh.pa...@ecosmob.com> wrote:
>>>>>
>>>>>> Hello Jehan,
>>>>>>
>>>>>> OpenSIPS handle NAT different way for INVITE and REGISTER packets. If
>>>>>> we use fix_nated_contact(), it will get the actual source ip from network
>>>>>> and create a lump for that and replace the headers(like Contact, Received
>>>>>> in Via and c parameter in SDP packet) just before sent out or relay the
>>>>>> packet.
>>>>>>
>>>>>> In your case, You need to manage the REGISTER and we are using
>>>>>> OpenSIPS as a Registrar so we are not relay the packet so
>>>>>> fix_nated_contact() will not help you. and your location table will have
>>>>>> the private ip not public. So Let me guide how NAT can be managed in
>>>>>> Registration.
>>>>>>
>>>>>> There are three modules are responsible for the registration with NAT
>>>>>> handling.
>>>>>> 1. registrar module
>>>>>> 2. usrloc module
>>>>>> 3. nathelper module
>>>>>>
>>>>>> nathelper module can check the packet source is behind nat or nat and
>>>>>> get the public ip from source ip.
>>>>>>
>>>>>> We need to define a module parameter for netheper module with an
>>>>>> avp variable so the module will store the received IP in that avp. and
>>>>>> similar avp should be in registrar module so registrar module can read 
>>>>>> the
>>>>>> avp and store it into location as received parameter.
>>>>>>
>>>>>> modparam("nathelper", "received_avp", "$avp(received)")
>>>>>>
>>>>>> modparam("registrar", "received_avp", "$avp(received)")
>>>>>>
>>>>>>
>>>>>> Refer the following sni

Re: [OpenSIPS-Users] Public IP in REGISTER

2020-03-08 Thread Jehanzaib Younis
i do
if(isflagset(8))
{
setbflag(3);
setbflag(NAT);
setbflag(7);
}
   save("location");
   exit;
I have modparam("usrloc", "nat_bflag", "NAT")  & modparam("nathelper",
"sipping_bflag", 7)

On Mon, Mar 9, 2020 at 12:56 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Have you tried setting the bflag right before save()’ing during the
> REGISTER?
>
> On Sun, 8 Mar 2020 at 23:34, Jehanzaib Younis 
> wrote:
>
>> Hi David,
>>
>> I have one contact in the Usrloc
>> Do you think it could be a timeout issue? or i should use
>> remove_on_timeout_bflag option?
>>
>> On Mon, Mar 9, 2020 at 12:31 PM David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>>
>>> Make sure you don’t have 2 contacts
>>>
>>> On Sun, 8 Mar 2020 at 23:22, Jehanzaib Younis 
>>> wrote:
>>>
>>>> but i have strange issue.
>>>> nathelper keep on sending the OPTION to old IP:PORT. As soon as the new
>>>> REGISTER comes in, it should only send the option to the latest one.
>>>> For example, I see OPTION going to xx.xxx.xx.xx:25001 and opensips keep
>>>> on sending to this after every 120 seconds (which is my setting)
>>>> The new register comes in and the  xx.xxx.xx.xx:25004 letsay and now
>>>> opensips sends to 25001 as well as 25004. Obviously my cpe only replies to
>>>> the latest one.
>>>>
>>>> Anyone have faced this issue ?
>>>>
>>>> Thank you
>>>>
>>>> On Fri, Mar 6, 2020 at 2:54 PM Jehanzaib Younis <
>>>> jehanzaib.ki...@gmail.com> wrote:
>>>>
>>>>> Thank you for your suggestions Diptesh,
>>>>>
>>>>> Actually adding modparam("nathelper", "received_avp", "$avp(s:rcv)") &
>>>>> modparam("registrar", "received_avp", "$avp(s:rcv)") did the trick.
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Mar 5, 2020 at 7:25 PM Dipteshkumar Patel <
>>>>> diptesh.pa...@ecosmob.com> wrote:
>>>>>
>>>>>> Hello Jehan,
>>>>>>
>>>>>> OpenSIPS handle NAT different way for INVITE and REGISTER packets. If
>>>>>> we use fix_nated_contact(), it will get the actual source ip from network
>>>>>> and create a lump for that and replace the headers(like Contact, Received
>>>>>> in Via and c parameter in SDP packet) just before sent out or relay the
>>>>>> packet.
>>>>>>
>>>>>> In your case, You need to manage the REGISTER and we are using
>>>>>> OpenSIPS as a Registrar so we are not relay the packet so
>>>>>> fix_nated_contact() will not help you. and your location table will have
>>>>>> the private ip not public. So Let me guide how NAT can be managed in
>>>>>> Registration.
>>>>>>
>>>>>> There are three modules are responsible for the registration with NAT
>>>>>> handling.
>>>>>> 1. registrar module
>>>>>> 2. usrloc module
>>>>>> 3. nathelper module
>>>>>>
>>>>>> nathelper module can check the packet source is behind nat or nat and
>>>>>> get the public ip from source ip.
>>>>>>
>>>>>> We need to define a module parameter for netheper module with an
>>>>>> avp variable so the module will store the received IP in that avp. and
>>>>>> similar avp should be in registrar module so registrar module can read 
>>>>>> the
>>>>>> avp and store it into location as received parameter.
>>>>>>
>>>>>> modparam("nathelper", "received_avp", "$avp(received)")
>>>>>>
>>>>>> modparam("registrar", "received_avp", "$avp(received)")
>>>>>>
>>>>>>
>>>>>> Refer the following snippet.
>>>>>>
>>>>>> /*Other registrar Parameters*/
>>>>>> modparam("registrar", "received_avp", "$avp(received)")
>>>>>>
>>>>>> /*Other nethelper Parameters*/
>>&

Re: [OpenSIPS-Users] Public IP in REGISTER

2020-03-08 Thread Jehanzaib Younis
Hi David,

I have one contact in the Usrloc
Do you think it could be a timeout issue? or i should use
remove_on_timeout_bflag option?

On Mon, Mar 9, 2020 at 12:31 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Make sure you don’t have 2 contacts
>
> On Sun, 8 Mar 2020 at 23:22, Jehanzaib Younis 
> wrote:
>
>> but i have strange issue.
>> nathelper keep on sending the OPTION to old IP:PORT. As soon as the new
>> REGISTER comes in, it should only send the option to the latest one.
>> For example, I see OPTION going to xx.xxx.xx.xx:25001 and opensips keep
>> on sending to this after every 120 seconds (which is my setting)
>> The new register comes in and the  xx.xxx.xx.xx:25004 letsay and now
>> opensips sends to 25001 as well as 25004. Obviously my cpe only replies to
>> the latest one.
>>
>> Anyone have faced this issue ?
>>
>> Thank you
>>
>> On Fri, Mar 6, 2020 at 2:54 PM Jehanzaib Younis <
>> jehanzaib.ki...@gmail.com> wrote:
>>
>>> Thank you for your suggestions Diptesh,
>>>
>>> Actually adding modparam("nathelper", "received_avp", "$avp(s:rcv)") &
>>> modparam("registrar", "received_avp", "$avp(s:rcv)") did the trick.
>>>
>>>
>>>
>>> On Thu, Mar 5, 2020 at 7:25 PM Dipteshkumar Patel <
>>> diptesh.pa...@ecosmob.com> wrote:
>>>
>>>> Hello Jehan,
>>>>
>>>> OpenSIPS handle NAT different way for INVITE and REGISTER packets. If
>>>> we use fix_nated_contact(), it will get the actual source ip from network
>>>> and create a lump for that and replace the headers(like Contact, Received
>>>> in Via and c parameter in SDP packet) just before sent out or relay the
>>>> packet.
>>>>
>>>> In your case, You need to manage the REGISTER and we are using OpenSIPS
>>>> as a Registrar so we are not relay the packet so fix_nated_contact() will
>>>> not help you. and your location table will have the private ip not public.
>>>> So Let me guide how NAT can be managed in Registration.
>>>>
>>>> There are three modules are responsible for the registration with NAT
>>>> handling.
>>>> 1. registrar module
>>>> 2. usrloc module
>>>> 3. nathelper module
>>>>
>>>> nathelper module can check the packet source is behind nat or nat and
>>>> get the public ip from source ip.
>>>>
>>>> We need to define a module parameter for netheper module with an
>>>> avp variable so the module will store the received IP in that avp. and
>>>> similar avp should be in registrar module so registrar module can read the
>>>> avp and store it into location as received parameter.
>>>>
>>>> modparam("nathelper", "received_avp", "$avp(received)")
>>>>
>>>> modparam("registrar", "received_avp", "$avp(received)")
>>>>
>>>>
>>>> Refer the following snippet.
>>>>
>>>> /*Other registrar Parameters*/
>>>> modparam("registrar", "received_avp", "$avp(received)")
>>>>
>>>> /*Other nethelper Parameters*/
>>>> modparam("nathelper", "received_avp", "$avp(received)") #keep in mind
>>>> that this avp should be same in registrar module.
>>>>
>>>> /*Other usrloc Parameters*/
>>>> modparam("usrloc", "nat_bflag", "NAT_FLAG")
>>>>
>>>> route(NAT_MANAGE);
>>>> ---
>>>> /*Some Authentication Stuff*/
>>>> ---
>>>> if(!save("location")) {
>>>> sl_reply_error();
>>>> }
>>>>
>>>> route[NAT_MANAGE] {
>>>> if(nat_uac_test("19")){
>>>> xlog("L_INFO","--- [NAT_MANAGE] UAC IS BEHIND NAT ---");
>>>> if(is_method("REGISTER")){
>>>> fix_nated_register();
>>>> setbflag(NAT_FLAG);
>>>> } else {
>>>>     fix_nated_contact();
>>>> setflag(NAT_FLAG);
>>>> if (has_body("application/sdp")){
>>>> fix_nated_sdp("3");
>>>> }
>>>> }
>>>> }
>>>> }
>>&g

Re: [OpenSIPS-Users] Public IP in REGISTER

2020-03-08 Thread Jehanzaib Younis
but i have strange issue.
nathelper keep on sending the OPTION to old IP:PORT. As soon as the new
REGISTER comes in, it should only send the option to the latest one.
For example, I see OPTION going to xx.xxx.xx.xx:25001 and opensips keep on
sending to this after every 120 seconds (which is my setting)
The new register comes in and the  xx.xxx.xx.xx:25004 letsay and now
opensips sends to 25001 as well as 25004. Obviously my cpe only replies to
the latest one.

Anyone have faced this issue ?

Thank you

On Fri, Mar 6, 2020 at 2:54 PM Jehanzaib Younis 
wrote:

> Thank you for your suggestions Diptesh,
>
> Actually adding modparam("nathelper", "received_avp", "$avp(s:rcv)") &
> modparam("registrar", "received_avp", "$avp(s:rcv)") did the trick.
>
>
>
> On Thu, Mar 5, 2020 at 7:25 PM Dipteshkumar Patel <
> diptesh.pa...@ecosmob.com> wrote:
>
>> Hello Jehan,
>>
>> OpenSIPS handle NAT different way for INVITE and REGISTER packets. If we
>> use fix_nated_contact(), it will get the actual source ip from network and
>> create a lump for that and replace the headers(like Contact, Received in
>> Via and c parameter in SDP packet) just before sent out or relay the packet.
>>
>> In your case, You need to manage the REGISTER and we are using OpenSIPS
>> as a Registrar so we are not relay the packet so fix_nated_contact() will
>> not help you. and your location table will have the private ip not public.
>> So Let me guide how NAT can be managed in Registration.
>>
>> There are three modules are responsible for the registration with NAT
>> handling.
>> 1. registrar module
>> 2. usrloc module
>> 3. nathelper module
>>
>> nathelper module can check the packet source is behind nat or nat and get
>> the public ip from source ip.
>>
>> We need to define a module parameter for netheper module with an
>> avp variable so the module will store the received IP in that avp. and
>> similar avp should be in registrar module so registrar module can read the
>> avp and store it into location as received parameter.
>>
>> modparam("nathelper", "received_avp", "$avp(received)")
>>
>> modparam("registrar", "received_avp", "$avp(received)")
>>
>>
>> Refer the following snippet.
>>
>> /*Other registrar Parameters*/
>> modparam("registrar", "received_avp", "$avp(received)")
>>
>> /*Other nethelper Parameters*/
>> modparam("nathelper", "received_avp", "$avp(received)") #keep in mind
>> that this avp should be same in registrar module.
>>
>> /*Other usrloc Parameters*/
>> modparam("usrloc", "nat_bflag", "NAT_FLAG")
>>
>> route(NAT_MANAGE);
>> ---
>> /*Some Authentication Stuff*/
>> ---
>> if(!save("location")) {
>> sl_reply_error();
>> }
>>
>> route[NAT_MANAGE] {
>> if(nat_uac_test("19")){
>> xlog("L_INFO","--- [NAT_MANAGE] UAC IS BEHIND NAT ---");
>> if(is_method("REGISTER")){
>> fix_nated_register();
>> setbflag(NAT_FLAG);
>> } else {
>> fix_nated_contact();
>> setflag(NAT_FLAG);
>> if (has_body("application/sdp")){
>> fix_nated_sdp("3");
>> }
>> }
>> }
>> }
>>
>> Output of opensipsctl ul show
>> ---
>>
>> AOR:: 1...@world.provider.in
>> Contact:: sip:100@[ACTUAL CONTACT IP]:5060 Q=
>> ContactID:: 2522655082190201667
>> Expires:: 2219
>> Callid:: 18480129104911-28121824031899@192.168.30.238
>> Cseq:: 6
>> User-agent:: Phone Ver2.2
>> Received:: sip:[RECEIVED IP]:5060 /*This IP will be used as
>> request domain on relay the packet*/
>> State:: CS_SYNC
>> Flags:: 0
>> Cflags:: SIPPING_RTO SIPPING_ENABLE NAT_FLAG
>> Socket:: udp:[OPENSIPS LISTEN SOCKET]:5070
>> Methods:: 7551
>>
>> I hope this will solve your problem.
>>
>> Thanks & Regards
>> *Diptesh Patel*
>> Software Developer
>> Ecosmob Technologies Ltd,
>> Ahmedabad
>> Mo:*+919898962659*
>>
>>
>> On Thu, Mar 5, 2020 at 4:35 AM Jehanzaib Younis <
>> jehanzaib.ki...@

Re: [OpenSIPS-Users] Public IP in REGISTER

2020-03-05 Thread Jehanzaib Younis
Thank you for your suggestions Diptesh,

Actually adding modparam("nathelper", "received_avp", "$avp(s:rcv)") &
modparam("registrar", "received_avp", "$avp(s:rcv)") did the trick.



On Thu, Mar 5, 2020 at 7:25 PM Dipteshkumar Patel 
wrote:

> Hello Jehan,
>
> OpenSIPS handle NAT different way for INVITE and REGISTER packets. If we
> use fix_nated_contact(), it will get the actual source ip from network and
> create a lump for that and replace the headers(like Contact, Received in
> Via and c parameter in SDP packet) just before sent out or relay the packet.
>
> In your case, You need to manage the REGISTER and we are using OpenSIPS as
> a Registrar so we are not relay the packet so fix_nated_contact() will not
> help you. and your location table will have the private ip not public. So
> Let me guide how NAT can be managed in Registration.
>
> There are three modules are responsible for the registration with NAT
> handling.
> 1. registrar module
> 2. usrloc module
> 3. nathelper module
>
> nathelper module can check the packet source is behind nat or nat and get
> the public ip from source ip.
>
> We need to define a module parameter for netheper module with an
> avp variable so the module will store the received IP in that avp. and
> similar avp should be in registrar module so registrar module can read the
> avp and store it into location as received parameter.
>
> modparam("nathelper", "received_avp", "$avp(received)")
>
> modparam("registrar", "received_avp", "$avp(received)")
>
>
> Refer the following snippet.
>
> /*Other registrar Parameters*/
> modparam("registrar", "received_avp", "$avp(received)")
>
> /*Other nethelper Parameters*/
> modparam("nathelper", "received_avp", "$avp(received)") #keep in mind that
> this avp should be same in registrar module.
>
> /*Other usrloc Parameters*/
> modparam("usrloc", "nat_bflag", "NAT_FLAG")
>
> route(NAT_MANAGE);
> ---
> /*Some Authentication Stuff*/
> ---
> if(!save("location")) {
> sl_reply_error();
> }
>
> route[NAT_MANAGE] {
> if(nat_uac_test("19")){
> xlog("L_INFO","--- [NAT_MANAGE] UAC IS BEHIND NAT ---");
> if(is_method("REGISTER")){
> fix_nated_register();
> setbflag(NAT_FLAG);
> } else {
> fix_nated_contact();
> setflag(NAT_FLAG);
> if (has_body("application/sdp")){
> fix_nated_sdp("3");
> }
> }
> }
> }
>
> Output of opensipsctl ul show
> ---
>
> AOR:: 1...@world.provider.in
> Contact:: sip:100@[ACTUAL CONTACT IP]:5060 Q=
> ContactID:: 2522655082190201667
> Expires:: 2219
> Callid:: 18480129104911-28121824031899@192.168.30.238
> Cseq:: 6
> User-agent:: Phone Ver2.2
>     Received:: sip:[RECEIVED IP]:5060 /*This IP will be used as
> request domain on relay the packet*/
> State:: CS_SYNC
> Flags:: 0
> Cflags:: SIPPING_RTO SIPPING_ENABLE NAT_FLAG
> Socket:: udp:[OPENSIPS LISTEN SOCKET]:5070
> Methods:: 7551
>
> I hope this will solve your problem.
>
> Thanks & Regards
> *Diptesh Patel*
> Software Developer
> Ecosmob Technologies Ltd,
> Ahmedabad
> Mo:*+919898962659*
>
>
> On Thu, Mar 5, 2020 at 4:35 AM Jehanzaib Younis 
> wrote:
>
>> Thank you for your email Callum,
>> I can not see the public IP in the command line that is strange. but
>> OPTION is working fine. i can see 200 OK in the OPTION.
>> I have already tried what you have suggested i.e fixed_nated_contact on
>> INVITE it is still sending to my 10.xx.xx.xx ip.
>>
>> Here is my URL location
>> AOR:: xx
>> Contact:: sip:x...@10.202.128.xx:5060;transport=udp Q=
>> Expires:: 2914
>> Callid:: n883832msp1lm0nl3cmjks88jkpin...@10.202.128.xx
>> Cseq:: 12
>> User-agent:: HUAWEI-EchoLife HG8240H/V3R013C10S108
>> State:: CS_NEW
>> Flags:: 0
>> Cflags:: 3
>> Socket:: udp:mysipserverip:5060
>> Methods:: 8191
>>
>> here is my url and nat module parameters
>>
>> loadmodule "usrloc.so"
>> modparam("usrloc&

Re: [OpenSIPS-Users] Public IP in REGISTER

2020-03-04 Thread Jehanzaib Younis
Thank you for your email Callum,
I can not see the public IP in the command line that is strange. but OPTION
is working fine. i can see 200 OK in the OPTION.
I have already tried what you have suggested i.e fixed_nated_contact on
INVITE it is still sending to my 10.xx.xx.xx ip.

Here is my URL location
AOR:: xx
Contact:: sip:x...@10.202.128.xx:5060;transport=udp Q=
Expires:: 2914
Callid:: n883832msp1lm0nl3cmjks88jkpin...@10.202.128.xx
Cseq:: 12
User-agent:: HUAWEI-EchoLife HG8240H/V3R013C10S108
State:: CS_NEW
Flags:: 0
Cflags:: 3
Socket:: udp:mysipserverip:5060
Methods:: 8191

here is my url and nat module parameters

loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "db_mode",   0)

loadmodule "nathelper.so"
modparam("nathelper", "natping_interval", 120) # Ping interval 120 s
modparam("nathelper", "ping_nated_only", 1)   # Ping only clients behind NAT
modparam("nathelper", "sipping_method", "OPTIONS")
modparam("nathelper", "sipping_from", "sip:pin...@mytestdomain.com")
modparam("nathelper", "received_avp", "$avp(i:42)")
modparam("nathelper", "sipping_bflag", 7)

loadmodule "nat_traversal.so"
modparam("nat_traversal", "keepalive_interval", 120)
modparam("nat_traversal", "keepalive_method", "OPTIONS")
modparam("nat_traversal", "keepalive_from", "sip:pin...@mytestdomain.com")

Any suggestions please?

Thank you


On Wed, Mar 4, 2020 at 9:50 PM Callum Guy  wrote:

> Hi Jehan,
>
> Sounds like you want to be using fix_nated_contact() - when the INVITE
> arrives you can try the following:
>
> # Check if contact is RFC1918
> if (nat_uac_test(1)) {
> # Replace the contact IP with the received address from the network
> fix_nated_contact();
> }
>
> If you look at the registrations via CLI or database (if in use) you'll
> see that OpenSIPs is tracking both a contact and received value to deal
> with this - that will be where your NAT pings are getting the address from.
>
> Hopefully that helps to get you on the correct path!
>
> Callum
>
> On Tue, 3 Mar 2020 at 21:06, Jehanzaib Younis 
> wrote:
>
>> Hi gang,
>>
>> I have quite strange issue. When in some cases when my customer's have
>> 10.202.128.xx range they are behind NAT. when i see opensipsctl ul show
>> number@sip
>> i see contact header as Contact:: sip:num...@10.202.128.xx:5060;transport=udp
>> Q=
>> which means when i try to relay the invite goes to that
>> 10.202.128.xx:5060 which is wrong. It should go to its public IP:port
>>
>> but weird thing is, i see the OPTION is sent to its Public IP (OPTIONS
>> sip:180.xx.xx.xx:1502). I also see the 200 OK which is perfect.
>>
>> I tried to use fix_nated_register(); but it does not change anything.
>>
>> Can anyone help please?
>>
>> Thank you
>>
>>
>> Regards,
>> Jehan
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> *0333 332   |  www.x-on.co.uk <http://www.x-on.co.uk>  |   **
> <https://www.linkedin.com/company/x-on>   <https://www.facebook.com/XonTel>
>   <https://twitter.com/xonuk> *
>
> X-on is a trading name of Storacall Technology Ltd a limited company
> registered in England and Wales.
> Registered Office : Avaland House, 110 London Road, Apsley, Hemel
> Hempstead, Herts, HP3 9SD. Company Registration No. 2578478.
> The information in this e-mail is confidential and for use by the
> addressee(s) only. If you are not the intended recipient, please notify
> X-on immediately on +44(0)333 332  and delete the
> message from your computer. If you are not a named addressee you must not
> use, disclose, disseminate, distribute, copy, print or reply to this email. 
> Views
> or opinions expressed by an individual
> within this email may not necessarily reflect the views of X-on or its
> associated companies. Although X-on routinely screens for viruses,
> addressees should scan this email and any attachments
> for viruses. X-on makes no representation or warranty as to the absence of
> viruses in this email or any attachments.
>
> ___
> 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] Public IP in REGISTER

2020-03-03 Thread Jehanzaib Younis
Hi gang,

I have quite strange issue. When in some cases when my customer's have
10.202.128.xx range they are behind NAT. when i see opensipsctl ul show
number@sip
i see contact header as Contact:: sip:num...@10.202.128.xx:5060;transport=udp
Q=
which means when i try to relay the invite goes to that 10.202.128.xx:5060
which is wrong. It should go to its public IP:port

but weird thing is, i see the OPTION is sent to its Public IP (OPTIONS
sip:180.xx.xx.xx:1502). I also see the 200 OK which is perfect.

I tried to use fix_nated_register(); but it does not change anything.

Can anyone help please?

Thank you


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