Re: [OpenSIPS-Users] How to handle concurrent answering calls?

2021-10-07 Thread volga629 via Users

  
  
Hello Fulo,
Bogdan provided work around some time ago.
Inside  onreply route  

    # Drop other 200 OK 
    if(isbflagset("RETRY_200OK_BFLAG")) {
    if(is_method("INVITE|UPDATE") &&
t_check_status("200")) {
    drop();
    }
    }

   # mark first INVITE
    if(is_method("INVITE|UPDATE") &&
t_check_status("200")) {
    setbflag("RETRY_200OK_BFLAG");

volga629

  
On 8/30/21 4:22 AM, Fulo Lin wrote:


  
  
When the user has two devices answering the phone at the
  same time, I expect the first device to answer the call and
  the second device to be cancelled.
  
  The current opensips will indeed cancel the second call, but
  the first call will have no sound, and the call will be
  disconnected after a few seconds.
  
  I found that opensips sends all 200 Ok (SDP) to the caller,
  and I expect that the second 200 Ok (SDP) should not be sent
  to the caller.
  

I try to block the second 200 Ok(SDP) in onreply_route,
  like this.

  onreply_route[handle_nat] {
           if (t_check_status("200")) {
                   # t_cancel_branch(); No effect
                   # drop(); No effect
                   #exit;
           }
  }
  
  But this seems to have no effect.
  
  Is there a way to block the second 200 Ok (SDP) in
  onreply_route?
  
  Or is there any other way to handle concurrent answering
  calls?
  
  I use opensips 3.1.5 and rtpproxy 2.2.0.
  
  
  
  ___
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 handle concurrent answering calls?

2021-08-30 Thread volga629 via Users

  
  

Hello Fulo,
Bogdan provided work around some time ago.
Inside  onreply route  

    # Drop other 200 OK 
    if(isbflagset("RETRY_200OK_BFLAG")) {
    if(is_method("INVITE|UPDATE") &&
t_check_status("200")) {
    drop();
    }
    }

   # mark first INVITE
    if(is_method("INVITE|UPDATE") &&
t_check_status("200")) {
    setbflag("RETRY_200OK_BFLAG");

volga629

  
On 8/30/21 4:22 AM, Fulo Lin wrote:


  
  
When the user has two devices answering the phone at the
  same time, I expect the first device to answer the call and
  the second device to be cancelled.
  
  The current opensips will indeed cancel the second call, but
  the first call will have no sound, and the call will be
  disconnected after a few seconds.
  
  I found that opensips sends all 200 Ok (SDP) to the caller,
  and I expect that the second 200 Ok (SDP) should not be sent
  to the caller.
  

I try to block the second 200 Ok(SDP) in onreply_route,
  like this.

  onreply_route[handle_nat] {
           if (t_check_status("200")) {
                   # t_cancel_branch(); No effect
                   # drop(); No effect
                   #exit;
           }
  }
  
  But this seems to have no effect.
  
  Is there a way to block the second 200 Ok (SDP) in
  onreply_route?
  
  Or is there any other way to handle concurrent answering
  calls?
  
  I use opensips 3.1.5 and rtpproxy 2.2.0.
  
  
  
  ___
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] MOH / rtpengine

2021-08-09 Thread volga629 via Users

  
  
Hello Miha,

You can try in dialog requests section use 

   if(has_body("application/sdp")) {
    if(search_body("a=sendonly") ||
search_body("a=inactive")) {

Also might need try use 

from-tag parameter, address (media address from the SDP), SRTP
flags
  
  
volga629
  
On 8/9/21 3:19 AM, Miha via Users
  wrote:


  
  Hi

when call is being trasfered to another number MS Teams sends
new Invite with SDP as 'a=inactive'. How can I put ringback ton
as MOH for this sitation?

I tried with:

  
  if(is_audio_on_hold()) { xlog("L_INFO", "onHOLD"); rtpengine_play_media("file=/home/ringback.wav");
  }

  
  From logs i can see that due to a=inactive rtpengine will not play
  media. I tried also to replace inactive with sendonly with
  function body_replace before I call rtpengine_play_media but it
  does not help.
  
  
  thank you
  miha
  
  
  ___
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 lookup

2021-04-06 Thread volga629 via Users

  
  
Hello Liviu,
I opened report 
https://github.com/OpenSIPS/opensips/issues/2454

And all pcap and logs sent to you email. 
If you will require configuration example let me know. I will
pull one from our environment. 


volga629

  
On 3/30/21 7:01 AM, Liviu Chircu wrote:

On
  26.03.2021 17:57, volga629 wrote:
  
  Hello Liviu,

I want file report on it. I have wireshark screenshot which
shows exact issue.

Initial INVITE lookup is  forked to all registered destinations,
but ACK no.

  
  
  Hi Slava,
  
  
  Please file a report on it and attach the call flow.  If privacy
  is a concern, just email
  
  the screenshots to my email address.
  
  
  Best regards,
  
  


  


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


Re: [OpenSIPS-Users] mid_registrar lookup

2021-03-26 Thread volga629 via Users

  
  
Hello Liviu,
I want file report on it. I have wireshark screenshot which shows
exact issue. 
Initial INVITE lookup is  forked to all registered destinations, but
ACK no.

On ACK in dialog applied snippet like this 

route[WITHINDLG] {
     if(has_totag()) {
 if(topology_hiding_match()) {

           if(is_method("ACK") && $DLG_did!=NULL &&
$DLG_did!="
    xlog("[IN_DIALOG] [$rm] in dialog ACK with
dialog ID => [$DLG_did]\n");
    setflag("FLAG_ACK_IN_DIALOG");
    }
  route(RELAY);
 exit;
   } else {
   ...
    }
}

route[RELAY] {
 
  } else if(isflagset("FLAG_ACK_IN_DIALOG")) {
    $ru = $tu;
    route(CONTACT_LOOKUP);
    }
    if(is_method("ACK") &&
$avp(ua_orig_trns)==NULL) {
    #  TCP applied 
    $var(src_socket) = "tcp" + ":" +
$avp(req_ip) + ":" + "5084";
    }
            $socket_out = $var(src_socket);
    xlog("[RELAY] [$rm] sending call ~> $ru over $socket_out
for $ci\n");
    if(!t_relay()) {
    send_reply(500, "Internal Error");
    exit;
    }
    exit;

}

volga629
 

On 3/24/21 1:14 PM, volga629 via Users
  wrote:

    
  
      Hello Liviu,
  May I send few screen shot of sip flow for this call ?
  
  volga629.
  
  On 3/24/21 8:57 AM, volga629 via
Users wrote:
  
  

Hello Liviu,
We use topology hiding edge proxy for end point.
Here are example 
of contact header 

Contact: 

that call is inbound from PBX  to opensips and opensips forward
to end point.


   
if(is_method("INVITE|UPDATE|ACK|BYE|CANCEL|NOTIFY|INFO|OPTIONS")
&& $rU=~"%40") {
    xlog("[RELAY] [$rm] testing original
[$ru]\n");
    route(CONTACT_LOOKUP);
    # We want exclude ACK rewrite toward Bria Push
Server
    } else if(!isflagset("FLAG_BRIA_PUSH")) {
    xlog("[RELAY] [$rm] didn't match R-URI
schema [$ru] correcting\n");
    $ru = "sip:" + $tU + "%40" + $td + "@" +
$td;
        route(CONTACT_LOOKUP);
    }


volga629 

On 3/24/21 5:04 AM, Liviu Chircu
  wrote:


  
  On 24.03.2021 05:04, volga629 via
Users wrote:
  
  But then arrive the ACK
and that where start the problems lookup  only find
first contact and not second.
  Hi Volga,
  So you're doing a lookup() on the
  ACK Request-URI?  Typically, the ACK R-URI will contain a
  contact header, which is not meant to be searchable.  I'm
  surprised you even get 1 result, I would expect such a
  lookup() to return -1.
  Can you explain what you are trying
  to achieve?  Why not just route the ACK using
  loose_route(), just like all other mid-dialog requests,
  and be done with it?

  -- 
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.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



  


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


Re: [OpenSIPS-Users] mid_registrar lookup

2021-03-24 Thread volga629 via Users

  
  
Hello Liviu,
May I send few screen shot of sip flow for this call ?

volga629.

On 3/24/21 8:57 AM, volga629 via Users
  wrote:


  
  Hello Liviu,
  We use topology hiding edge proxy for end point.
  Here are example 
  of contact header 
  
  Contact: 
  
  that call is inbound from PBX  to opensips and opensips forward to
  end point.
  
  
     
  if(is_method("INVITE|UPDATE|ACK|BYE|CANCEL|NOTIFY|INFO|OPTIONS")
  && $rU=~"%40") {
      xlog("[RELAY] [$rm] testing original
  [$ru]\n");
      route(CONTACT_LOOKUP);
      # We want exclude ACK rewrite toward Bria Push
  Server
      } else if(!isflagset("FLAG_BRIA_PUSH")) {
      xlog("[RELAY] [$rm] didn't match R-URI
  schema [$ru] correcting\n");
      $ru = "sip:" + $tU + "%40" + $td + "@" +
  $td;
      route(CONTACT_LOOKUP);
      }
  
  
  volga629 
  
  On 3/24/21 5:04 AM, Liviu Chircu
    wrote:
  
  

On 24.03.2021 05:04, volga629 via
  Users wrote:

But then arrive the ACK and
  that where start the problems lookup  only find first
  contact and not second.
Hi Volga,
So you're doing a lookup() on the ACK
Request-URI?  Typically, the ACK R-URI will contain a
contact header, which is not meant to be searchable.  I'm
surprised you even get 1 result, I would expect such a
lookup() to return -1.
Can you explain what you are trying to
achieve?  Why not just route the ACK using loose_route(),
just like all other mid-dialog requests, and be done with
it?
  
-- 
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.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] Mid_Registrar outgoing_expire issue (Bug?)

2021-03-24 Thread volga629 via Users

  
  
Hello Liviu,
Is in 3.1.2 all those fixes  will be released ?

volga629 
  
On 3/24/21 10:26 AM, Liviu Chircu
  wrote:


  
  On 24.03.2021 15:18, Ricardo Martinez
wrote:
  
  
I'm using
version: opensips 3.1.0 (x86_64/linux)
git revision: 58804282f
  
  git log 58804282fe5..HEAD
modules/mid_registrar
  There are at least 8 mid-registrar fixes
  which you are missing, including:
  --
  commit a958382016e9825c4d2363157f29ea356b57d67a
  Author: Liviu Chircu 
  Date:   Fri Jan 15 18:17:42 2021 +0200
  
      mid_registrar: Fix "Expires" edge-case in AoR throttling
  mode
      
      This fixes a bug where the mid-registrar, in mode == 2,
  would not
      correctly process REGISTER requests containing both:
      * an ";expires=" Contact param
      * an "Expires" header field
      
      Specifically, the "Expires" header would incorrectly
  transit "as is",
      without being changed.
      
      Related to #2350
  --
  So my advice would be to pull latest 3.1
  code and see if the "Expires" header processing behavior
  improves.

  Best regards,
  
  -- 
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.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] mid_registrar lookup

2021-03-24 Thread volga629 via Users

  
  
Hello Liviu,
We use topology hiding edge proxy for end point.
Here are example 
of contact header 

Contact: 

that call is inbound from PBX  to opensips and opensips forward to
end point.


   
if(is_method("INVITE|UPDATE|ACK|BYE|CANCEL|NOTIFY|INFO|OPTIONS")
&& $rU=~"%40") {
    xlog("[RELAY] [$rm] testing original
[$ru]\n");
    route(CONTACT_LOOKUP);
    # We want exclude ACK rewrite toward Bria Push
Server
    } else if(!isflagset("FLAG_BRIA_PUSH")) {
    xlog("[RELAY] [$rm] didn't match R-URI
schema [$ru] correcting\n");
    $ru = "sip:" + $tU + "%40" + $td + "@" +
$td;
    route(CONTACT_LOOKUP);
    }


volga629 

On 3/24/21 5:04 AM, Liviu Chircu wrote:


  
  On 24.03.2021 05:04, volga629 via
Users wrote:
  
  But then arrive the ACK and
that where start the problems lookup  only find first
contact and not second.
  Hi Volga,
  So you're doing a lookup() on the ACK
  Request-URI?  Typically, the ACK R-URI will contain a contact
  header, which is not meant to be searchable.  I'm surprised
  you even get 1 result, I would expect such a lookup() to
  return -1.
  Can you explain what you are trying to
  achieve?  Why not just route the ACK using loose_route(), just
  like all other mid-dialog requests, and be done with it?

  -- 
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com


  


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


[OpenSIPS-Users] mid_registrar lookup

2021-03-23 Thread volga629 via Users

  
  
Hello Everyone,
One extension contain multiply  registered devices. 
We use mid_registrar in AOR  mode 2. 
The issue that lookup always find only result .


For example:
Inbound call from provider to  class 5 device then to opensips.
Opensips mid_registrar doing lookup on INVITE and forward to all
registered devices which normally 2 in count.
But then arrive the ACK and that where start the problems
lookup  only find first contact and not second.
User answer on second device and first device send CANCEL, but
ACK again is sent to  first device with CANCEL , but not second.

Is there are way tweak mid registrar lookup ?


volga629.
  
  


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


Re: [OpenSIPS-Users] Mid_Registrar outgoing_expire issue (Bug?)

2021-03-23 Thread volga629 via Users

  
  
Hello Ricardo,
I noticed this issue too. My work around is 

Where 7200 is  outgoing_expires in module params.




if($(hdr("Expires"){s.int})!=7200) {
    remove_hf("Expires");
    append_hf("Expires: 7200\r\n");
    }

volga629
  
On 3/23/21 12:46 PM, Ricardo Martinez
  wrote:


  Hi.
I’m still unable to understand why the REGISTER is not using the
outgoing_expire.
First.   It's weird because according to the debug seems to change the
outgoing_expire to 3600 but when I check the outgoing REGISTER from the
MID_REGISTRAR still has the Expire Header = 300.
One thing I noticed is for the first REGISTER (the one the
outgoing_expires works) it changes the Expires header ok, this REGISTER
does not have contact expire header, but for the second REGISTER.. which
has Expire header and expire contact header.. seems to apply only the
"expire in the contact header"
(DBG:mid_registrar:replace_expires_ct_param).
These are the debugs...
Is this a bug? Or maybe I'm missing something?

1. Outgoing Expire  OK
INCOMING REGISTER
Contact:
sip:d2.596@192.168.0.34;rinstance=fa92ef51cba5543d;transport=tls>;+sip.ins
tance="
Expires: 300.

DBG:mid_registrar:mid_reg_save: saving to location...
DBG:mid_registrar:prepare_forward: from: '"Ricardo
Martinez";tag=ba489a60'
DBG:mid_registrar:prepare_forward: Call-ID:
'187541_mobile-rel120YzljYzJjNjcwOGJlYmYxOTU0MDM1NDBlMDJiZDQyNjg'
DBG:mid_registrar:prepare_forward: Contact:
';+sip.i
nstance=""'
DBG:mid_registrar:prepare_forward: registering ptr 0x7f6efc9c6b78 on
TMCB_REQUEST_FWDED ...
DBG:mid_registrar:prepare_forward: registering for TMCB_RESPONSE_FWDED,
mri=0x7f6efc9c6b78 ...
DBG:mid_registrar:prepare_forward: registering for TMCB_RESPONSE_DELETED,
mri=0x7f6efc9c6b78 ...
[187541_mobile-rel120YzljYzJjNjcwOGJlYmYxOTU0MDM1NDBlMDJiZDQyNjg]
[from_vex] [REGISTER sin totag][mid_registrar_save]: Retorna valor 1
[187541_mobile-rel120YzljYzJjNjcwOGJlYmYxOTU0MDM1NDBlMDJiZDQyNjg]
[from_vex] [REGISTER sin totag][mid_registrar_save]:
sip:d2@dom1.company.com:5061 salvado en tabla location
DBG:mid_registrar:mid_reg_req_fwded: msg expires: '300'
DBG:mid_registrar:calc_contact_expires: expires: 300
DBG:mid_registrar:calc_ob_contact_expires: outgoing expires: 1616511318
DBG:mid_registrar:overwrite_contact_expirations: ... contact:
'sip:d2.596@192.168.0.34;rinstance=fa92ef51cba5543d;transport=tls>;+sip.in
stance=""#015' Calculated
TIMEOUT = 1616511318 (3600)
DBG:mid_registrar:replace_expires_hf: ... Exp hdr: '300'
DBG:mid_registrar:mid_reg_req_fwded: trimming all Contact URIs into one...
DBG:mid_registrar:calc_contact_expires: expires: 300
DBG:mid_registrar:trim_to_single_contact: deleting Contact
';+sip.i
nstance=""'
DBG:mid_registrar:trim_to_single_contact: inserting new Contact
''
DBG:mid_registrar:calc_contact_expires: expires: 300
DBG:mid_registrar:mid_reg_req_fwded: REQ FORWARDED TO
'sip:dom1.company.com:5061' (obp: sip:192.141.XXX.94:5060), expires=3600

OUTGOING REGISTER
Contact: .
Expires: 3600.

2. Outgoing_expire fail
But for the Second REGISTER (from the PUSH SERVER)
INCOMING REGISTER
Contact:
;+sip.instance="";reg-id=1;expires=300
Expires: 300.

DBG:mid_registrar:mid_reg_save: saving to location...
DBG:mid_registrar:prepare_forward: from:
';tag=0f1c2a07'
DBG:mid_registrar:prepare_forward: Call-ID:
'y12mg-n8ka5jro_j-bhqn...@216.93.xxx.121'
DBG:mid_registrar:prepare_forward: Contact:
';+sip.instance="";reg-id=1;expires=300'
DBG:mid_registrar:prepare_forward: registering ptr 0x7f6efc9b60d0 on
TMCB_REQUEST_FWDED ...
DBG:mid_registrar:prepare_forward: registering for TMCB_RESPONSE_FWDED,
mri=0x7f6efc9b60d0 ...
DBG:mid_registrar:prepare_forward: registering for TMCB_RESPONSE_DELETED,
mri=0x7f6efc9b60d0 ...
[y12mg-n8ka5jro_j-bhqn...@216.93.xxx.121] [from_vex] [REGISTER sin
totag][mid_registrar_save]: Retorna valor 1
[y12mg-n8ka5jro_j-bhqn...@216.93.xxx.121] [from_vex] [REGISTER sin
totag][mid_registrar_save]: sip:d2@dom1.company.com:5061 salvado en
tabla location
DBG:mid_registrar:mid_reg_req_fwded: msg expires: '300'
DBG:mid_registrar:calc_contact_expires: expires: 300
DBG:mid_registrar:calc_ob_contact_expires: outgoing expires: 1616511408
DBG:mid_registrar:overwrite_contact_expirations: ... contact:
'sip:d2@216.93.xxx.120:5060;transport=TLS>;+sip.instance="";reg-id=1;expires=300#015' Calculated
TIMEOUT = 1616511408 (3600)
DBG:mid_registrar:replace_expires_ct_param: replacing expires, ct
'sip:d2@216.93.xxx.120:5060;transport=TLS' '300' with 3600,
0x7f6f3cf1e5b0 -> 0x7f6f3cf1e861 (0x7f6f3cf1e6d9)
DBG:mid_registrar:mid_reg_req_fwded: trimming all Contact URIs into one...
DBG:mid_registrar:calc_contact_expires: expires: 300
DBG:mid_registrar:trim_to_single_contact: deleting Contact
';+sip.instance="";reg-id=1;expires=300'
DBG:mid_registrar:trim_to_single_contact: inserting new Contact
''

Re: [OpenSIPS-Users] [BLOG] Exploring SSL/TLS libraries for OpenSIPS 3.2

2021-02-12 Thread volga629 via Users

  
  
Hello Vlad,
Interesting thoughts about wolfssl.
How it will play with Linux system where are default openssl.
If it will require additional packaging. 
What benefits compare to current state.

Just some questions list so I will not forget later on to ask.


volga629
 
  
On 2/11/21 12:45 PM, Callum Guy wrote:


  Thanks for that Vlad, I always learn something from these article
releases and this was no exception 

On Thu, 11 Feb 2021 at 12:35, Vlad Patrascu  wrote:

  

Hello everyone,

Check out this new blog post [1] that recounts our process of searching
for and choosing a SSL/TLS library to use in OpenSIPS 3.2, as an
alternative to the problematic OpenSSL.

[1]
https://blog.opensips.org/2021/02/11/exploring-ssl-tls-libraries-for-opensips-3-2/

Cheers,

--
Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.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] dispatcher cluster

2021-02-04 Thread volga629 via Users

  
  
Hello Razvan,
Thank you for reply, I tried collect pcap and there are  no
breaks in connections just normal udp traffic or event socket
8021. 
I am not sure why in cluster mode 41 should do any operation if
configuration says that 61 is responsible for ping. 
Also I disabled cluster operation on both 41 and 61 completely
to test and dispatcher rock solid where I see ping from each
node, but that expected.


volga629. 
  
On 2/4/21 10:51 AM, Răzvan Crainea
  wrote:

Hi,
  Volga!
  
  
  It looks like opensips 41 is trying itself to use the
  destinations, but most likely is not able to. Can you take a pcap
  of the communication between node 41 and the gateways, to see why
  node 41 disables them?
  
  
  Best regards,
  
  
  Răzvan Crainea
  
  OpenSIPS Core Developer
  
  http://www.opensips-solutions.com
  
  
  On 2/2/21 5:32 PM, volga629 via Users wrote:
  
  Hello Everyone,

Dispatcher in cluster causing destinations goes down
unexpectedly.

*Scenario: *

Two nodes with last ip octet 61 and 41.

Freeswitch stats to calculate  weight.

*Issue:*

61 is  set to ping all destinations and report to the 41 the
status via cluster, the issue that 41 bring down all
destinations into Inactive state after cluster update message
until ds_reload issued again.

*Attempt to fix: *

I tried set limit on which groups which node can ping, but seems
like in cluster it should be relevant, because 61 should  get
status of all groups and send to  41.

*Relevant Config:*

Node 61:


| Dispatcher loadmodule "dispatcher.so"
modparam("dispatcher", "db_url", "postgres://")
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "setid_col", "setid")
modparam("dispatcher", "priority_col", "priority")
modparam("dispatcher", "destination_col", "destination")
modparam("dispatcher", "cnt_avp", "$avp(274)")
modparam("dispatcher", "grp_avp", "$avp(275)")
modparam("dispatcher", "hash_pvar", "$avp(273)")
modparam("dispatcher", "dst_avp", "$avp(271)")
modparam("dispatcher", "sock_avp", "$avp(276)")
modparam("dispatcher", "ds_ping_from", "sip:proxy@10.30.100.61")
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_interval", 45)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_probing_threshold", 5)
modparam("dispatcher", "ds_probing_list", "2,3,4")
modparam("dispatcher", "fetch_freeswitch_stats", 1)
modparam("dispatcher", "options_reply_codes",
"501,403,404,400,200") modparam("dispatcher", "cluster_id", 1)
|Node 41: | Dispatcher loadmodule "dispatcher.so"
modparam("dispatcher", "") modparam("dispatcher", "table_name",
"dispatcher") modparam("dispatcher", "setid_col", "setid")
modparam("dispatcher", "priority_col", "priority")
modparam("dispatcher", "destination_col", "destination")
modparam("dispatcher", "cnt_avp", "$avp(274)")
modparam("dispatcher", "grp_avp", "$avp(275)")
modparam("dispatcher", "hash_pvar", "$avp(273)")
modparam("dispatcher", "dst_avp", "$avp(271)")
modparam("dispatcher", "sock_avp", "$avp(276)")
modparam("dispatcher", "ds_ping_from", "sip:proxy@10.30.100.41")
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_interval", 45)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_probing_threshold", 5)
modparam("dispatcher", "fetch_f

Re: [OpenSIPS-Users] opensips dialplan regex

2021-02-02 Thread volga629 via Users

  
  
Hello Johan,
Huge thank you that resolve the issue.

volga629
  
On 2/2/21 12:58 PM, Johan De Clercq
  wrote:


  
  
if your _expression_ means : any number of digits, then try
  something like below: 



try ([0-9]*)([A-Z]*)([0-9]*)


replace with \1\3. 

  
  
  
Op di 2 feb. 2021 om 17:45
  schreef volga629 via Users <users@lists.opensips.org>:


   Hello Everyone,
Here are some test result 

Feb  3 00:38:46 voice-proxy /usr/sbin/opensips[1337808]:
[REQ_ROUTE] [INVITE] got incorrect 1506855JMGTJ4566
adjusting...
Feb  3 00:38:46 voice-proxy /usr/sbin/opensips[1337808]:
[REQ_ROUTE] [INVITE] new username -> [1506855JMGTJ4566]
~> 1506855

As you see digits on the end got lost.

volga629.

On 2/2/21 11:47 AM, volga629 via Users wrote:

 Hello Everyone,
  I am trying clean up with dialplan  any characters
  from $rU except digits.
  I tried regex rule
  
  Matching Regular _expression_ 
   ([0-9]*)

  Substitution
  Regular _expression_
  ([0-9]*)
  
  Replacement _expression_
  \1
  
  
  Example: 
  fhgg592199477719hh#
  
I
  see that rule match regex, but rewrite is not
  happening.
  
  Any help thank you.
  
  volga629.
 
  
  ___
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] opensips dialplan regex

2021-02-02 Thread volga629 via Users

  
  
Hello Everyone,
Here are some test result 

Feb  3 00:38:46 voice-proxy /usr/sbin/opensips[1337808]: [REQ_ROUTE]
[INVITE] got incorrect 1506855JMGTJ4566 adjusting...
Feb  3 00:38:46 voice-proxy /usr/sbin/opensips[1337808]: [REQ_ROUTE]
[INVITE] new username -> [1506855JMGTJ4566] ~> 1506855

As you see digits on the end got lost.

volga629.

On 2/2/21 11:47 AM, volga629 via Users
  wrote:


  
  Hello Everyone,
  I am trying clean up with dialplan  any characters from $rU
  except digits.
  I tried regex rule
  
  Matching Regular _expression_ 
   ([0-9]*)

  Substitution Regular
  _expression_
  ([0-9]*)
  
  Replacement _expression_
  \1
  
  
  Example: 
  fhgg592199477719hh#
  
I see that
  rule match regex, but rewrite is not happening.
  
  Any help thank you.
  
  volga629.
 
  
  ___
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] opensips dialplan regex

2021-02-02 Thread volga629 via Users

  
  
Hello Everyone,
I am trying clean up with dialplan  any characters from $rU
except digits.
I tried regex rule

Matching Regular _expression_ 
 ([0-9]*)
  
Substitution Regular
_expression_
([0-9]*)

Replacement _expression_
\1


Example: 
fhgg592199477719hh#

  I see that
rule match regex, but rewrite is not happening.

Any help thank you.

volga629.
  
  


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


[OpenSIPS-Users] dispatcher cluster

2021-02-02 Thread volga629 via Users

  
  
Hello Everyone,
Dispatcher in cluster causing destinations goes down
unexpectedly.  
Scenario: 
Two nodes with last ip octet 61 and 41.
Freeswitch stats to calculate  weight.
Issue:
61 is  set to ping all destinations and report to the 41 the
status via cluster, the issue that 41 bring down all
destinations into Inactive state after cluster update message
until ds_reload issued again.
Attempt to fix: 
I tried set limit on which groups which node can ping, but seems
like in cluster it should be relevant, because 61 should  get
status of all groups and send to  41.
Relevant Config:
Node 61:
  
 Dispatcher
loadmodule "dispatcher.so"
modparam("dispatcher", "db_url", "postgres://")
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "setid_col", "setid")
modparam("dispatcher", "priority_col", "priority")
modparam("dispatcher", "destination_col", "destination")
modparam("dispatcher", "cnt_avp", "$avp(274)")
modparam("dispatcher", "grp_avp", "$avp(275)")
modparam("dispatcher", "hash_pvar", "$avp(273)")
modparam("dispatcher", "dst_avp", "$avp(271)")
modparam("dispatcher", "sock_avp", "$avp(276)")
modparam("dispatcher", "ds_ping_from", "sip:proxy@10.30.100.61")
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_interval", 45)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_probing_threshold", 5)
modparam("dispatcher", "ds_probing_list", "2,3,4")
modparam("dispatcher", "fetch_freeswitch_stats", 1)
modparam("dispatcher", "options_reply_codes", "501,403,404,400,200")
modparam("dispatcher", "cluster_id", 1)

Node 41:

 Dispatcher
loadmodule "dispatcher.so"
modparam("dispatcher", "")
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "setid_col", "setid")
modparam("dispatcher", "priority_col", "priority")
modparam("dispatcher", "destination_col", "destination")
modparam("dispatcher", "cnt_avp", "$avp(274)")
modparam("dispatcher", "grp_avp", "$avp(275)")
modparam("dispatcher", "hash_pvar", "$avp(273)")
modparam("dispatcher", "dst_avp", "$avp(271)")
modparam("dispatcher", "sock_avp", "$avp(276)")
modparam("dispatcher", "ds_ping_from", "sip:proxy@10.30.100.41")
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_interval", 45)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_probing_threshold", 5)
modparam("dispatcher", "fetch_freeswitch_stats", 1)
modparam("dispatcher", "options_reply_codes", "501,403,404,400,200")
modparam("dispatcher", "ds_probing_list", "1")
modparam("dispatcher", "cluster_id", 1)
modparam("dispatcher", "cluster_sharing_tag", "vip")



Comments:
I think in cluster 41 should not do any operation or decisions regard node states and it should rely on 61 only 

Log: 

 41 node
[root@vprx00 ~]# grep EVENT /var/log/opensips/opensips.log
Feb  1 12:44:57 vprx00 /usr/sbin/opensips[250547]: [EVENT_ROUTE] [DISPATCHER] received group=0 ~> address=sip:10.30.100.57:5160 ~> status=inactive
Feb  1 12:50:54 vprx00 /usr/sbin/opensips[250545]: [EVENT_ROUTE] [DISPATCHER] received group=0 ~> address=sip:10.30.100.48:5160 ~> status=inactive
Feb  1 12:52:15 vprx00 /usr/sbin/opensips[250538]: [EVENT_ROUTE] [DISPATCHER] received group=0 ~> address=sip:10.30.100.49:5160 ~> status=inactive

   41 node
   Feb  1 14:24:49 vprx00 /usr/sbin/opensips[250540]:
DBG:dispatcher:w_ds_select: ds_select: 1 1 1000 1
   Feb  1 14:24:49 vprx00 /usr/sbin/opensips[250540]:
DBG:dispatcher:ds_select_dst: no active destinations in set [1] !
 
volga629.


 
  
  

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


Re: [OpenSIPS-Users] sangoma issue ?

2021-01-19 Thread volga629 via Users

  
  
You can try on reply in
rtpengine answer supply always-transcode flag.

volga629
  
On 1/13/21 12:52 PM, Andy Dierlam
  wrote:


  
  Hi John, 


I've tested rtpengine's transcoding.   I like the load
  balancing features.  Though wish it could automatically
  transcode ( with out flags per call ? ) 
  And I would think under heavy load, hardware transcoding
  might scale better ?  Though maybe dedicated rtpengine
  servers(pooled) would serve just as well ? 


thanks
Andy


  
  
  
On Wed, Jan 13, 2021 at 11:45
  AM Johan De Clercq  wrote:


  

  
Why not use rtpengine to do
  transcoding? 
  
  
  
  
  Outlook voor iOS downloaden


Van: Users 
namens Andy Dierlam 
Verzonden: Wednesday, January 13, 2021 4:26:03 PM
Aan: users@lists.opensips.org

Onderwerp: Re: [OpenSIPS-Users] sangoma issue ?
   


  forgot to mention this from: 


opensips -V
  version: opensips 3.0.4 (x86_64/linux)
  flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP,
  PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC,
  FAST_LOCK-ADAPTIVE_WAIT
  ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144,
  MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
  poll method support: poll, epoll, sigio_rt, select.
  git revision: d19b20e
  main.c compiled on 14:39:30 Dec 21 2020 with gcc 4.8.5
  


FYI get the same results from 2.4, 3.0, and
  3.1 









  

  
  
  
On Tue, Jan 12, 2021 at 3:14 PM Andy
  Dierlam 
  wrote:


  Hello All, 


Wondering if anyone can offer some guidance on
  an issue seemingly with a newly setup Sangoma
  D-500 Transcoding card.


Issue: 
When using transcoding, soon after 1 transcoded
  call completes, utimer task messages until
  opensips is restarted
seems like it happens when fetch_dlg_value:
  looking for  



  Jan 12 15:05:26
  [21578] DBG:tm:timer_routine: timer
  routine:2,tl=0x7f9ce5fd3cc0 next=(nil),
  timeout=16
  Jan 12 15:05:26
  [21578] DBG:tm:wait_handler: removing
  0x7f9ce5fd3c40 from table 
  Jan 12 15:05:26
  [21578] DBG:tm:delete_cell: delete transaction
  0x7f9ce5fd3c40
  Jan 12 15:05:26
  [21578] DBG:tm:run_trans_callbacks:
  trans=0x7f9ce5fd3c40, callback type 4096, id 3
  entered
  Jan 12 15:05:26
  [21578] DBG:dialog:destroy_dlg: destroying
  dialog 0x7f9ce5fcdc50
  Jan 12 15:05:26
  [21578] DBG:dialog:destroy_dlg: dlg expired or
  not in list - dlg 0x7f9ce5fcdc50
  [57:1450509359] with clid
  '3b72b48a67a1eec840e2e1db12f8b37f@x.x.x.x' and
  tags 'as6d2cf831'
  'Yjg9IHv3tknz-KgDTUF.K-lleno6X-hI'
  Jan 12 15:05:26
  [21578] DBG:dialog:run_dlg_callbacks:
  dialog=0x7f9ce5fcdc50, type=2048
  Jan 12 15:05:26
  [21578] DBG:dialog:fetch_dlg_value: looking
  for 
  Jan 12 15:05:26
  [21561] 

Re: [OpenSIPS-Users] ms teams ACK

2020-04-29 Thread volga629 via Users

Try check you preset route.


volga629


On 4/29/20 10:59 AM, Santi Anton wrote:

Hello Ben,

I agree. These are the INVITE and 200 OK. I only could see that to and from
tag an Call-ID are the same. I think that in the article there is nothing
about modifying ACK headers to make it work.


INVITE sip:5...@sip.pstnhub.microsoft.com SIP/2.0
Record-Route:

Record-Route: 
Via: SIP/2.0/TLS 195.xx.xx.xx:5067;branch=z9hG4bK2f83.ee24a46.0
Via: SIP/2.0/UDP
80.xx.xx.xx.xx:5060;received=80.xx.xx.xx.xx;branch=z9hG4bK4df6ca5c;rport=5060
Max-Forwards: 69
From: ;tag=as7659f57d
To: 
Contact: 
Call-ID: 433371746cb44b7d76fdc42013bf9...@80.xx.xx.xx.xx:5060
CSeq: 102 INVITE
User-Agent: FPBX-12.0.76.6(11.20.0)
Date: Mon, 27 Apr 2020 16:25:24 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 1470


SIP/2.0 200 OK
FROM: ;tag=as7659f57d
TO: ;tag=50fe42a7fdb64fe583c1089a0b47f44a
CSEQ: 102 INVITE
CALL-ID: 433371746cb44b7d76fdc42013bf9...@80.xx.xx.xx.xx:5060
VIA: SIP/2.0/TLS 195.xx.xx.xx:5067;branch=z9hG4bK2f83.ee24a46.0,SIP/2.0/UDP
80.xx.xx.xx.xx:5060;received=80.xx.xx.xx.xx;branch=z9hG4bK4df6ca5c;rport=5060
RECORD-ROUTE:
,,
CONTACT:

CONTENT-LENGTH: 827
SUPPORTED: timer
CONTENT-TYPE: application/sdp
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
SESSION-EXPIRES: 3600;refresher=uas
SERVER: Microsoft.PSTNHub.SIPProxy v.2020.4.20.2 i.EUWE.6

Best Regards,



--
Sent from: 
http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

___
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] ms teams ACK

2020-04-27 Thread volga629 via Users

Hello Everyone,

Thank you all for the help.

Here are some highlight

1. Avoid call NAT in reply with 200 OK with option 1 or 3

2. Preset routing header toward Microsoft Teams.

3. Use record route toward you asterisk or feeeswitch.

4. Append contact header in keepalive messages.

5. Use dialplan feature to remove append + to normalize phone numbers.


volga629


On 4/19/20 9:40 AM, volga629 via Users wrote:


Hello Johan,

Thank you for reply.


The only NAT problem can be on MS Teams Client,  because on Opensips 
side pretty sure all good.



volga629


On 4/19/20 3:04 AM, Johan De Clercq wrote:
Can’t it be a NAT problem? The IP address where the bye is coming 
from doesn’t seem a pstnhub to me.


Outlook voor iOS <https://aka.ms/o0ukef> downloaden

*Van:* Users  namens volga629 via 
Users 

*Verzonden:* Saturday, April 18, 2020 11:01:19 PM
*Aan:* OpenSIPS users mailling list ; 
Alexey Vasilyev 

*Onderwerp:* Re: [OpenSIPS-Users] ms teams ACK

Hello Alexey,

Thank you on reply,

I undone all changes regard headers changes and MS Teams send BYE 
directly to asterisk.


No Route header present.

But INVITE ACK 183 180 all travel with  proper routing information.


2020/04/18 17:54:28.599711 190.109.70.77:5060 -> 190.109.68.250:5060
BYE sip:11988582770@190.109.68.250:5060 
 SIP/2.0
FROM:  
;tag=4d7fb0763c224e39a13a03c669c4b387
TO:  
;tag=as41e97ff5

CSEQ: 3 BYE
CALL-ID: 2e6c1a8d2383a4752403e94512ced077@190.109.70.77 
<mailto:2e6c1a8d2383a4752403e94512ced077@190.109.70.77>

MAX-FORWARDS: 69
Via: SIP/2.0/UDP 
190.109.70.77:5060;branch=z9hG4bK050e.e400e373.0;i=66c9c603
VIA: SIP/2.0/TLS 
52.114.14.70:5061;rport=8208;received=52.114.14.70;branch=z9hG4bK9594cd7
REASON: 
Q.850;cause=18;text="fcb37a2a-4bc4-49b6-a5e3-aabddc8f7a22;Call 
Controller timed out while waiting for acknowledgement."
CONTACT: 
 


CONTENT-LENGTH: 0
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.4.13.7 i.ASSE.3
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY


volga629


On 4/18/20 5:13 PM, Alexey Vasilyev wrote:

Hi volga629,

There were nothing special for ACK. You don't need to change
To/From/Contact. All the necessary steps were in the article
https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/  and for most
people it still works.
So I'm not sure, that MS changed anything, because all the hardware SBCs
should change behaviour, so they need new firmware. SBC vendors should
inform customers to update etc. So this is not so simple process. And it
definitely make no sense for anybody.
And in the test lab for the article I've used absolutely the same
architecture with asterisk, the only difference was RTPEngine to transcode
SRTP-RTP.
And within test lab I've tested not only calls, but transfers worked fine
too.



-
---
Alexey Vasilyev
--
Sent 
from:http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

___
Users mailing list
Users@lists.opensips.org  <mailto: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] string comparison

2020-04-26 Thread volga629 via Users

Hello Liviu,

Forgot mention version.

[root@pr1 ~]# opensips -V
version: opensips 3.1.0-dev (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, CC_O0, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535

poll method support: poll, epoll, sigio_rt, select.
main.c compiled on 10:46:54 Jan 29 2020 with gcc 8

volga629


On 4/26/20 10:35 AM, volga629 via Users wrote:

Hello Liviu,

I restructured config file to better see what was evaluated and I see 
in debug right now clearly that opensips is not evaluate properly.


Oh I don't see something.

Debug:


https://pastebin.com/GHmbb0Uf

Config


https://pastebin.com/P60Bh9En


volga629


On 4/24/20 7:57 AM, Liviu Chircu wrote:

On 24.04.2020 13:22, volga629 wrote:

if($var(tls-frompbx)==$var(usr_check_tls)) {
                $var(transport) = "tls";
                if(!codec_exists("opus")) {
                    $var(codec_flag_frompbx_tls) = "transcode-opus";
                }
                rtpengine_offer("replace-origin 
replace-session-connection $var(codec_flag_frompbx_tls) RTP/SAVP 
ICE=remove $var(dir)");

            }


Please add an "else" to this "if" block exactly as follows, run it 
and provide the output:


            if($var(tls-frompbx)==$var(usr_check_tls)) {
                $var(transport) = "tls";
                if(!codec_exists("opus")) {
                    $var(codec_flag_frompbx_tls) = "transcode-opus";
                }
                rtpengine_offer("replace-origin 
replace-session-connection $var(codec_flag_frompbx_tls) RTP/SAVP 
ICE=remove $var(dir)");

            } else {
    xlog("L_INFO", "DBG: TLS strings differ: 
'$var(tls-frompbx)'/'$var(usr_check_tls)', 
'$(var(tls-frompbx){s.len})'/'$(var(usr_check_tls){s.len})', 
'$(var(tls-frompbx){s.md5})'/'$(var(usr_check_tls){s.md5})'\n");

    }

Also, what is the output of "opensips -V"?

Best regards,

--
Liviu Chircu
www.twitter.com/liviuchircu  |www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, Fall 2020
   www.opensips.org/events

___
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] string comparison

2020-04-26 Thread volga629 via Users

Hello Liviu,

I restructured config file to better see what was evaluated and I see in 
debug right now clearly that opensips is not evaluate properly.


Oh I don't see something.

Debug:


https://pastebin.com/GHmbb0Uf

Config


https://pastebin.com/P60Bh9En


volga629


On 4/24/20 7:57 AM, Liviu Chircu wrote:

On 24.04.2020 13:22, volga629 wrote:

if($var(tls-frompbx)==$var(usr_check_tls)) {
                $var(transport) = "tls";
                if(!codec_exists("opus")) {
                    $var(codec_flag_frompbx_tls) = "transcode-opus";
                }
                rtpengine_offer("replace-origin 
replace-session-connection $var(codec_flag_frompbx_tls) RTP/SAVP 
ICE=remove $var(dir)");

            }


Please add an "else" to this "if" block exactly as follows, run it and 
provide the output:


            if($var(tls-frompbx)==$var(usr_check_tls)) {
                $var(transport) = "tls";
                if(!codec_exists("opus")) {
                    $var(codec_flag_frompbx_tls) = "transcode-opus";
                }
                rtpengine_offer("replace-origin 
replace-session-connection $var(codec_flag_frompbx_tls) RTP/SAVP 
ICE=remove $var(dir)");

            } else {
    xlog("L_INFO", "DBG: TLS strings differ: 
'$var(tls-frompbx)'/'$var(usr_check_tls)', 
'$(var(tls-frompbx){s.len})'/'$(var(usr_check_tls){s.len})', 
'$(var(tls-frompbx){s.md5})'/'$(var(usr_check_tls){s.md5})'\n");

    }

Also, what is the output of "opensips -V"?

Best regards,

--
Liviu Chircu
www.twitter.com/liviuchircu  |www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, Fall 2020
   www.opensips.org/events

___
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] string comparison

2020-04-24 Thread volga629 via Users

  
  
Hello Liviu,
The issue that even avp to avp or var to
var failing always false there no routes or  special operation.

  
I posted log with md5 strings and the both
the same and == still return false .
  
xlog("MD5 over cached user ~> $(avp(tls-frompbx){s.md5})
checked user ~> $(avp(usr_check_tls){s.md5})\n");



Log


Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: ---setting as BLF
callee 

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: Number of calls
from user 1...@demo.sip.lan is 2

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: Number of calls
from domain demo.sip.lan is 0

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: Is [INVITE] from
fs ~> 192.168.50.12 and sip:201%40demo.sip.lan@192.168.50.10:5060

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: looking up [sip:201%40demo.sip.lan@192.168.50.10:5060]

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: WSS: [INVITE]
found transport ~> tls

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: [INVITE] fetched
var ~> tls_201

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: MD5 over cached
user ~> b384583ffd6d280b18286afa30399850 checked user ~>
b384583ffd6d280b18286afa30399850

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: [INVITE] Call
going from LAN SouceIP <192.168.50.12> to WAN with
transport set ~> [tcp MobileFlag] original transport
[tls_201] and checked transport [tls_201]

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12583]: OnReply_Route3:
[INVITE] fetched var ~> plain_100

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12583]: OnReply_Route3:
[INVITE] and call status 183 and transport plain_100

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12583]: OnReply_Route3:
[INVITE] [183] Default match [FS ~> Client]

Apr 23 16:23:12 pr1 /usr/sbin/opensips[12591]: OnReply_Route3:
[INVITE] fetched var ~> plain_100 
  

  
Script 
  
route[RTP_MANAGE] {
    if(!is_method("INVITE|UPDATE|BYE|CANCEL"))
        return;

    if(cache_fetch("redis:wss-grp","wss-frompbx",
$var(wss-frompbx))) {
        xlog("[$rm] fetched var ~> $var(wss-frompbx)\n");
        cache_remove("redis:wss-grp","wss-frompbx");
    }

    if(cache_fetch("redis:wss-grp","tls-frompbx",
$var(tls-frompbx))) {
    xlog("[$rm] fetched var ~>
$avp(tls-frompbx)\n");
    cache_remove("redis:wss-grp","tls-frompbx");
    }

    if(is_method("INVITE|UPDATE|ACK") &&
has_body("application/sdp")) {
        if(isflagset("FLAG_FROM_FS")) {
            $var(usr_check) = "wss_" + $tU;
            $var(usr_check_tls) = "tls_" + $(tU{s.select,0,%});
            $var(dir) = "in-iface=internal out-iface=external";
            $var(codec_flag_frompbx) = "codec-strip-G722
codec-strip-CN codec-strip-G726 codec-strip-PCMA
transcode-opus";
            $var(wss_codec_trans) = "transcode-VP8
transcode-H264";
            $var(trns) = "UDP/TLS/RTP/SAVPF SDES-no";
         $var(transport) = '';
            if($var(tls-frompbx)==$var(usr_check_tls)) {
                $var(transport) = "tls";
                if(!codec_exists("opus")) {
                    $var(codec_flag_frompbx_tls) =
"transcode-opus";
                }
                rtpengine_offer("replace-origin
replace-session-connection $var(codec_flag_frompbx_tls) RTP/SAVP
ICE=remove $var(dir)");
            }
            if($var(wss-frompbx)==$var(usr_check)) {
                $var(transport) = "wss";
                    rtpengine_offer(" $var(wss_codec_trans)
$var(codec_flag_frompbx) replace-session-connection
replace-origin $var(trns) $var(dir)");
            }


volga629

On 4/23/20 10:34 AM, Liviu Chircu
  wrote:


  
  On 23.04.2020 15:26, volga629 via
Users wrote:
  
  
$var(usr_check_tls) = "tls_" +
$(tU{s.select,0,%});
Second  var
cache_fetch("redis:wss-grp","tls-frompbx",
$avp(tls-frompbx))
   

Re: [OpenSIPS-Users] string comparison

2020-04-23 Thread volga629 via Users

Hello John,

Thank you  for reply.

I wonder if it something to do that variable contain numbers and letters.

Example: tls_201


I wonder if I can compare md5 .

volga629


On 4/23/20 11:26 AM, John Quick wrote:

Hi Volga,

I just added a check on one of my test servers, making use of some existing 
code that sets a variable $var(srctype) to various values including:

   if (is_registered("location"))
   $var(srctype) = "regd-user";

The new code I added just below looks like this:

   $var(teststr) = "regd-user";
   if ($var(srctype) == $var(teststr))
  xlog("L_WARN", "## SOURCE IS A REGISTERED USER ##\n");

Then I registered an IP Phone and made a call. Output to my log file:
2020-04-23 15:10:40  ## SOURCE IS A REGISTERED USER ##

So the basic test for comparing strings should work. There must be some other 
explanation.
I have known situations where it was necessary to cast a string value to be 
recognised as an integer, but you are only testing strings.
Could there be a leading or trailing space? Perhaps you need to use a trim 
function. Check out the string transformations:
https://www.opensips.org/Documentation/Script-Tran-2-4#toc1
To understand what is happening you could try using regex test, =~  instead of 
equality, ==
You could report the length of the string values stored in the two vars, using 
{s.len} transformation (see above link).

John Quick
Smartvox Limited


-Original Message-
From: volga629 
Sent: 23 April 2020 14:43
To: john.qu...@smartvox.co.uk; users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] string comparison

Hello John,

I tested var to var

and test still failing

Tried

   if($var(tls-frompbx)=="$var(usr_check_tls)")

or this

   if($var(tls-frompbx)==$var(usr_check_tls))

volga629


On 4/23/20 9:41 AM, John Quick wrote:

Hi Volga

Please could you always format your emails to the users group as plain
text, not HTML.
I had to copy and paste then save and re-open just to read your question.

I would think the most likely explanation for the string comparison
failing is that you are comparing an $avp with a $var They are
different - in particular, an AVP can hold several values, somewhat
like an array type in other languages.
Can you try the same test but with a var for both sides of the comparison.

John Quick
Smartvox Limited







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


Re: [OpenSIPS-Users] string comparison

2020-04-23 Thread volga629 via Users

Yes, I set all to avp

volga629


On 4/23/20 11:44 AM, Ivailo Dobrev wrote:


Hi Volga

Maybe I'm missing something but 
"if($avp(tls-frompbx)==$var(usr_check_tls))" !!! AVP = VAR !!!


In xlog both vars are AVP.


On 4/23/20 5:31 PM, volga629 wrote:


Hello Ivailo,

I tested md5 and  values are the same.


xlog("MD5 over cached user ~> $(avp(tls-frompbx){s.md5}) checked user 
~> $(avp(usr_check_tls){s.md5})\n");



Log

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: ---setting as BLF 
callee 
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: Number of calls from 
user 1...@demo.sip.lan is 2
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: Number of calls from 
domain demo.sip.lan is 0
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: Is [INVITE] from fs ~> 
192.168.50.12 and sip:201%40demo.sip.lan@192.168.50.10:5060
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: looking up 
[sip:201%40demo.sip.lan@192.168.50.10:5060]
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: WSS: [INVITE] found 
transport ~> tls
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: [INVITE] fetched var 
~> tls_201
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: MD5 over cached user 
~> b384583ffd6d280b18286afa30399850 checked user ~> 
b384583ffd6d280b18286afa30399850
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: [INVITE] Call going 
from LAN SouceIP <192.168.50.12> to WAN with transport set ~> [tcp 
MobileFlag] original transport [tls_201] and checked transport [tls_201]
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12583]: OnReply_Route3: 
[INVITE] fetched var ~> plain_100
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12583]: OnReply_Route3: 
[INVITE] and call status 183 and transport plain_100
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12583]: OnReply_Route3: 
[INVITE] [183] Default match [FS ~> Client]
Apr 23 16:23:12 pr1 /usr/sbin/opensips[12591]: OnReply_Route3: 
[INVITE] fetched var ~> plain_100



volga629


On 4/23/20 11:05 AM, Ivailo Dobrev wrote:

Hi Volga,

xlog  md5 of both vars before if statement. I'm pretty sure they 
will be different. Maybe not printable character ?


On 4/23/20 4:43 PM, volga629 via Users wrote:

Hello John,

I tested var to var

and test still failing

Tried

 if($var(tls-frompbx)=="$var(usr_check_tls)")

or this

 if($var(tls-frompbx)==$var(usr_check_tls))

volga629


On 4/23/20 9:41 AM, John Quick wrote:

Hi Volga

Please could you always format your emails to the users group as 
plain text,

not HTML.
I had to copy and paste then save and re-open just to read your 
question.


I would think the most likely explanation for the string 
comparison failing

is that you are comparing an $avp with a $var
They are different - in particular, an AVP can hold several 
values, somewhat

like an array type in other languages.
Can you try the same test but with a var for both sides of the 
comparison.


John Quick
Smartvox Limited





___
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] string comparison

2020-04-23 Thread volga629 via Users

Hello Ivailo,

I tested md5 and  values are the same.


xlog("MD5 over cached user ~> $(avp(tls-frompbx){s.md5}) checked user ~> 
$(avp(usr_check_tls){s.md5})\n");



Log

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: ---setting as BLF callee 

Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: Number of calls from user 
1...@demo.sip.lan is 2
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: Number of calls from 
domain demo.sip.lan is 0
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: Is [INVITE] from fs ~> 
192.168.50.12 and sip:201%40demo.sip.lan@192.168.50.10:5060
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: looking up 
[sip:201%40demo.sip.lan@192.168.50.10:5060]
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: WSS: [INVITE] found 
transport ~> tls
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: [INVITE] fetched var ~> 
tls_201
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: MD5 over cached user ~> 
b384583ffd6d280b18286afa30399850 checked user ~> 
b384583ffd6d280b18286afa30399850
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12598]: [INVITE] Call going from 
LAN SouceIP <192.168.50.12> to WAN with transport set ~> [tcp 
MobileFlag] original transport [tls_201] and checked transport [tls_201]
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12583]: OnReply_Route3: [INVITE] 
fetched var ~> plain_100
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12583]: OnReply_Route3: [INVITE] 
and call status 183 and transport plain_100
Apr 23 16:23:11 pr1 /usr/sbin/opensips[12583]: OnReply_Route3: [INVITE] 
[183] Default match [FS ~> Client]
Apr 23 16:23:12 pr1 /usr/sbin/opensips[12591]: OnReply_Route3: [INVITE] 
fetched var ~> plain_100



volga629


On 4/23/20 11:05 AM, Ivailo Dobrev wrote:

Hi Volga,

xlog  md5 of both vars before if statement. I'm pretty sure they will 
be different. Maybe not printable character ?


On 4/23/20 4:43 PM, volga629 via Users wrote:

Hello John,

I tested var to var

and test still failing

Tried

 if($var(tls-frompbx)=="$var(usr_check_tls)")

or this

 if($var(tls-frompbx)==$var(usr_check_tls))

volga629


On 4/23/20 9:41 AM, John Quick wrote:

Hi Volga

Please could you always format your emails to the users group as 
plain text,

not HTML.
I had to copy and paste then save and re-open just to read your 
question.


I would think the most likely explanation for the string comparison 
failing

is that you are comparing an $avp with a $var
They are different - in particular, an AVP can hold several values, 
somewhat

like an array type in other languages.
Can you try the same test but with a var for both sides of the 
comparison.


John Quick
Smartvox Limited





___
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] string comparison

2020-04-23 Thread volga629 via Users

Hello John,

I tested var to var

and test still failing

Tried

 if($var(tls-frompbx)=="$var(usr_check_tls)")

or this

 if($var(tls-frompbx)==$var(usr_check_tls))

volga629


On 4/23/20 9:41 AM, John Quick wrote:

Hi Volga

Please could you always format your emails to the users group as plain text,
not HTML.
I had to copy and paste then save and re-open just to read your question.

I would think the most likely explanation for the string comparison failing
is that you are comparing an $avp with a $var
They are different - in particular, an AVP can hold several values, somewhat
like an array type in other languages.
Can you try the same test but with a var for both sides of the comparison.

John Quick
Smartvox Limited





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


[OpenSIPS-Users] string comparison

2020-04-23 Thread volga629 via Users

  
  
Hello Everyone,
String comparison failing
I tried == and =~
First var 
  
$var(usr_check_tls) = "tls_" +
$(tU{s.select,0,%});
Second  var
cache_fetch("redis:wss-grp","tls-frompbx",
$avp(tls-frompbx))
This return always false
  
if($avp(tls-frompbx)==$var(usr_check_tls))
{
Log
            xlog("[$rm] Call going from
LAN SouceIP <$si> to WAN with transport set ~>
[$var(transport)] original transport [$avp(tls-frompbx)] and
checked transport [$var(usr_check_tls)]\n");
            t_on_reply("2");
  
8:56:45 AM - volga629_: Apr 23 13:34:55
pr1 /usr/sbin/opensips[11940]: [INVITE] Call going from LAN
SouceIP <192.168.50.12> to WAN with transport set ~>
[tcp MobileFlag] original transport [tls_201] and checked
transport [tls_201]
  

  
Any help thank you
volga629
  

  

  


  


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


Re: [OpenSIPS-Users] ms teams ACK

2020-04-19 Thread volga629 via Users

  
  
Hello Johan,
Thank you for reply.
  

  
The only NAT problem can be on MS Teams
Client,  because on Opensips side pretty sure all good.

  
volga629



On 4/19/20 3:04 AM, Johan De Clercq
  wrote:


  
  

  Can’t it be a NAT problem? The IP address where the bye
is coming from doesn’t seem a pstnhub to me.
  
  
  Outlook
  voor iOS downloaden

  
  
  Van: Users
   namens volga629 via
  Users 
  Verzonden: Saturday, April 18, 2020 11:01:19 PM
  Aan: OpenSIPS users mailling list
  ; Alexey Vasilyev
  
  Onderwerp: Re: [OpenSIPS-Users] ms teams ACK
 
  
  
Hello Alexey,
Thank you on reply,
I undone all changes regard headers
changes and MS Teams send BYE directly to asterisk.
  
No Route header present.
But INVITE ACK 183 180 all travel
with  proper routing information.
  

  
2020/04/18 17:54:28.599711
190.109.70.77:5060 -> 190.109.68.250:5060
BYE 
  sip:11988582770@190.109.68.250:5060 SIP/2.0
FROM: ;tag=4d7fb0763c224e39a13a03c669c4b387
TO: ;tag=as41e97ff5
CSEQ: 3 BYE
CALL-ID: 
  2e6c1a8d2383a4752403e94512ced077@190.109.70.77
MAX-FORWARDS: 69
Via: SIP/2.0/UDP
190.109.70.77:5060;branch=z9hG4bK050e.e400e373.0;i=66c9c603
VIA: SIP/2.0/TLS
52.114.14.70:5061;rport=8208;received=52.114.14.70;branch=z9hG4bK9594cd7
REASON:
Q.850;cause=18;text="fcb37a2a-4bc4-49b6-a5e3-aabddc8f7a22;Call
Controller timed out while waiting for acknowledgement."
CONTACT: 

CONTENT-LENGTH: 0
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.4.13.7
i.ASSE.3
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
  

  
volga629
  


On 4/18/20 5:13 PM, Alexey
  Vasilyev wrote:


  Hi volga629,

There were nothing special for ACK. You don't need to change
To/From/Contact. All the necessary steps were in the article
https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/ and for most
people it still works.
So I'm not sure, that MS changed anything, because all the hardware SBCs
should change behaviour, so they need new firmware. SBC vendors should
inform customers to update etc. So this is not so simple process. And it
definitely make no sense for anybody.
And in the test lab for the article I've used absolutely the same
architecture with asterisk, the only difference was RTPEngine to transcode
SRTP-RTP.
And within test lab I've tested not only calls, but transfers worked fine
too.



-
---
Alexey Vasilyev
--
Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

___
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] ms teams ACK

2020-04-18 Thread volga629 via Users

  
  
Hello Alexey,
Thank you on reply,
I undone all changes regard headers
changes and MS Teams send BYE directly to asterisk.
  
No Route header present.
But INVITE ACK 183 180 all travel with 
proper routing information.
  

  
2020/04/18 17:54:28.599711
190.109.70.77:5060 -> 190.109.68.250:5060
BYE sip:11988582770@190.109.68.250:5060 SIP/2.0
FROM:
;tag=4d7fb0763c224e39a13a03c669c4b387
TO: ;tag=as41e97ff5
CSEQ: 3 BYE
CALL-ID: 2e6c1a8d2383a4752403e94512ced077@190.109.70.77
MAX-FORWARDS: 69
Via: SIP/2.0/UDP
190.109.70.77:5060;branch=z9hG4bK050e.e400e373.0;i=66c9c603
VIA: SIP/2.0/TLS
52.114.14.70:5061;rport=8208;received=52.114.14.70;branch=z9hG4bK9594cd7
REASON:
Q.850;cause=18;text="fcb37a2a-4bc4-49b6-a5e3-aabddc8f7a22;Call
Controller timed out while waiting for acknowledgement."
CONTACT:

CONTENT-LENGTH: 0
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.4.13.7 i.ASSE.3
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
  

  
volga629
  


On 4/18/20 5:13 PM, Alexey Vasilyev
  wrote:


  Hi volga629,

There were nothing special for ACK. You don't need to change
To/From/Contact. All the necessary steps were in the article
https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/ and for most
people it still works.
So I'm not sure, that MS changed anything, because all the hardware SBCs
should change behaviour, so they need new firmware. SBC vendors should
inform customers to update etc. So this is not so simple process. And it
definitely make no sense for anybody.
And in the test lab for the article I've used absolutely the same
architecture with asterisk, the only difference was RTPEngine to transcode
SRTP-RTP.
And within test lab I've tested not only calls, but transfers worked fine
too.



-
---
Alexey Vasilyev
--
Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

___
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] ms teams ACK

2020-04-18 Thread volga629 via Users

  
  
Hello Ovidiu,
Thank you for reply
Call flow 

Asterisk <-> Opensips <-> MS Teams 

Call from MS Teams works 100 % include rtp, but to MS teams no. 

I am adding required record routes on INITIAL INVITE, but that
  not enough based on Johan posted docs.
I accommodated proper rewrite of From/To again based on spec doc
  in initial request.
All those parts based on debug doc.
Has to be something changed on Microsoft side.


volga629



volga629
  



On 4/18/20 4:33 PM, Ovidiu Sas wrote:


  You don't need to mess with the Contact header (unless you are
connecting NATed endpoints with MS servers).
You need to populate proper Record-Route headers in the initial INVITE
as explained int the blog:
https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/

-ovidiu

On Sat, Apr 18, 2020 at 3:26 PM volga629 via Users
 wrote:

  

Thank you for reply,

I fixed Contact header in ACK, but Microsoft still unhappy call drops after 20 sec.

ACK debug

https://paste.centos.org/view/21b816d1

volga629

On 4/18/20 5:54 AM, Johan De Clercq wrote:

Please find  the necessary manips in this doc.

https://www.oracle.com/webfolder/technetwork/acmepacket/Microsoft/SBC-MSFTTeams-NON-MB.pdf

https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/


Outlook voor iOS downloaden

Van: Users  namens volga629 via Users 
Verzonden: Saturday, April 18, 2020 3:38:33 AM
Aan: OpenSIPS users mailling list 
Onderwerp: [OpenSIPS-Users] ms teams ACK


Hello Everyone,

Is possible rewrite ACK contact header in dialog ?

My guess it expecting FQDN.

MS Teams disconnect the call after 20 sec

REASON: Q.850;cause=18;text="bc427610-edae-47b9-9daa-7ea74d40dcc7;Call Controller timed out while waiting for acknowledgement."

In this case ACK come from asterisk box.

Opensips Log:

/usr/sbin/opensips[3321]: [IN-DIALOG] [ACK] Contact header ~> [

volga629

___
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] ms teams ACK

2020-04-18 Thread volga629 via Users

  
  
Thank you for reply,
I fixed Contact header in ACK, but Microsoft still unhappy call drops after 20 sec.
ACK debug

https://paste.centos.org/view/21b816d1
volga629

On 4/18/20 5:54 AM, Johan De Clercq
  wrote:


  
  

  Please find  the necessary manips
in this doc.
  
  
  https://www.oracle.com/webfolder/technetwork/acmepacket/Microsoft/SBC-MSFTTeams-NON-MB.pdf
  
  
  https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/
  
  



Outlook
voor iOS downloaden
  
  
  Van: Users
   namens volga629 via
  Users 
  Verzonden: Saturday, April 18, 2020 3:38:33 AM
  Aan: OpenSIPS users mailling list
  
  Onderwerp: [OpenSIPS-Users] ms teams ACK
 
  
  
Hello Everyone,
Is possible rewrite ACK contact header in dialog ?
My guess it expecting FQDN. 
MS Teams disconnect the call after 20 sec 

REASON: Q.850;cause=18;text="bc427610-edae-47b9-9daa-7ea74d40dcc7;Call Controller timed out while waiting for acknowledgement."

In this case ACK come from asterisk box.  
Opensips Log:
/usr/sbin/opensips[3321]: [IN-DIALOG] [ACK] Contact header ~> [

volga629 
  

  


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


[OpenSIPS-Users] ms teams ACK

2020-04-17 Thread volga629 via Users

  
  
Hello Everyone,
Is possible rewrite ACK contact header in dialog ?
My guess it expecting FQDN.

MS Teams disconnect the call after 20 sec

REASON: Q.850;cause=18;text="bc427610-edae-47b9-9daa-7ea74d40dcc7;Call Controller timed out while waiting for acknowledgement."

In this case ACK come from asterisk box.  

Opensips Log:
/usr/sbin/opensips[3321]: [IN-DIALOG] [ACK] Contact header ~> [

volga629

  


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


Re: [OpenSIPS-Users] feature request

2020-03-31 Thread volga629 via Users

  
  
Hello Răzvan,
Thank you. I added to the list.
volga629


On 3/31/20 9:23 AM, Răzvan Crainea
  wrote:

Hi,
  Volga!
  
  
  This looks like a valid feature request.
  
  Please open this feature request on our tracker[1], so we can keep
  track of them easier.
  
  
  [1] https://github.com/OpenSIPS/opensips/issues
  
  
  Best regards,
  
  
  Răzvan Crainea
  
  OpenSIPS Core Developer
  
  http://www.opensips-solutions.com
  
  
  On 3/30/20 1:31 PM, volga629 via Users wrote:
  
  Hello Everyone,


I would like request add rfc3994 to presence modules that allow
use of application/im-iscomposing+xml.



https://www.ietf.org/rfc/rfc3994.txt



Any opinion welcome.


volga629



___

Users mailing list

Users@lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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

  


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


[OpenSIPS-Users] feature request

2020-03-30 Thread volga629 via Users

  
  
Hello Everyone,
I would like request add rfc3994 to
presence modules that allow use of 
application/im-iscomposing+xml.

  https://www.ietf.org/rfc/rfc3994.txt

  
Any opinion welcome.
  
volga629 
  
  


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


Re: [OpenSIPS-Users] uri table

2020-03-20 Thread volga629 via Users

  
  
Ok I figure out  
  

  
route[HANDLE_REGISTER] {
    # authenticate the REGISTER requests
    if(!www_authorize($rd, "subscriber")) {
    www_challenge($rd, "auth");
    exit;
    }

    if(!db_is_to_authorized("uri")) {
    send_reply(403,"Forbidden auth ID");
    exit;
    }

    if (!save("location"))
    sl_reply_error();
    exit;
}

      
    

On 3/20/20 3:19 PM, volga629 via Users
  wrote:


  
  Hello Everyone,
  
  Some documentation is mismatching in auth and_db modules, can
figure out what correct way 
  
  [root@dev1-msg scripts]# opensips -c -f
  /etc/opensips/opensips.cfg
  Mar 20 14:12:44 [25882] Traceback (last included file at the
  bottom):
  Mar 20 14:12:44 [25882]  0. /etc/opensips/opensips.cfg
  Mar 20 14:12:44 [25882] CRITICAL:core:yyerror: parse error in
  /etc/opensips/opensips.cfg:417:2-4: syntax error
  Mar 20 14:12:44 [25882]     }
  Mar 20 14:12:44 [25882] 
  Mar 20 14:12:44 [25882]     if(!db_is_to_authorized("uri")) {
  Mar 20 14:12:44 [25882]     ^~~
  Mar 20 14:12:44 [25882]         send_reply("403","Forbidden
  auth ID");
  Mar 20 14:12:44 [25882]         exit;
  Mar 20 14:12:44 [25882] CRITICAL:core:yyerror: parse error in
  /etc/opensips/opensips.cfg:417:2-4: 
  Mar 20 14:12:44 [25882] ERROR:core:parse_opensips_cfg: bad
  config file (2 errors)
  Mar 20 14:12:44 [25882] ERROR:core:main: failed to parse
  config file /etc/opensips/opensips.cfg
  

  route[HANDLE_REGISTER] {
      # authenticate the REGISTER requests
      if(!www_authorize("$rd", "subscriber")) 
          www_challenge("$rd", "auth");
          exit;
      }
  
      if(!db_is_to_authorized("uri")) {
          send_reply("403","Forbidden auth ID");
          exit;
      }
  
      if(!save("location"))
          sl_reply_error();
      exit;
  }
  

  

  

  volga629
  
  On 3/20/20 9:11 AM, volga629 via
Users wrote:
  
  

Hello Everyone,
I am trying migrate to 3.0 and I want
keep db_is_from_authorized("uri");, but can't understand
where need set use_uri_table


based on migration doc
function db_check_from() was replaced by the AUTH_DB
module with:

  if use_uri_table was
set, use db_is_from_authorized("uri")



volga629



___
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] uri table

2020-03-20 Thread volga629 via Users

  
  
Hello Everyone,

Some documentation is mismatching in auth and_db modules, can
  figure out what correct way 

[root@dev1-msg scripts]# opensips -c -f
/etc/opensips/opensips.cfg
Mar 20 14:12:44 [25882] Traceback (last included file at the
bottom):
Mar 20 14:12:44 [25882]  0. /etc/opensips/opensips.cfg
Mar 20 14:12:44 [25882] CRITICAL:core:yyerror: parse error in
/etc/opensips/opensips.cfg:417:2-4: syntax error
Mar 20 14:12:44 [25882]     }
Mar 20 14:12:44 [25882] 
Mar 20 14:12:44 [25882]     if(!db_is_to_authorized("uri")) {
Mar 20 14:12:44 [25882]     ^~~
Mar 20 14:12:44 [25882]         send_reply("403","Forbidden auth
ID");
Mar 20 14:12:44 [25882]         exit;
Mar 20 14:12:44 [25882] CRITICAL:core:yyerror: parse error in
/etc/opensips/opensips.cfg:417:2-4: 
Mar 20 14:12:44 [25882] ERROR:core:parse_opensips_cfg: bad
config file (2 errors)
Mar 20 14:12:44 [25882] ERROR:core:main: failed to parse config
file /etc/opensips/opensips.cfg

  
route[HANDLE_REGISTER] {
    # authenticate the REGISTER requests
    if(!www_authorize("$rd", "subscriber")) 
        www_challenge("$rd", "auth");
        exit;
    }

    if(!db_is_to_authorized("uri")) {
        send_reply("403","Forbidden auth ID");
        exit;
    }

    if(!save("location"))
        sl_reply_error();
    exit;
}

  

  

  
volga629

On 3/20/20 9:11 AM, volga629 via Users
  wrote:


  
  Hello Everyone,
  I am trying migrate to 3.0 and I want
  keep db_is_from_authorized("uri");, but can't understand where
  need set use_uri_table
  
  
  based on migration doc
  function db_check_from() was replaced by the
  AUTH_DB module with:
  
if use_uri_table was
  set, use db_is_from_authorized("uri")
  
  
  
  volga629
  
  
  
  ___
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] uri table

2020-03-20 Thread volga629 via Users

  
  
Hello Everyone,
I am trying migrate to 3.0 and I want keep
db_is_from_authorized("uri");, but can't understand where need
set use_uri_table


based on migration doc
function db_check_from() was
replaced by the AUTH_DB module with:

  if use_uri_table was
set, use db_is_from_authorized("uri")



volga629

  


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


Re: [OpenSIPS-Users] opensips + rtpengine

2020-03-18 Thread volga629 via Users

  
  
I will do that test. 

On 3/18/20 6:37 AM, Alain Bieuzent
  wrote:


  
  
  
  
Hi Volga,
 
Your configuration look good,
 
Have you check the number of port really use by
rtpengine when you ran out of ports ? (netstat -paun | grep
rtpengine | wc -l)
 
Regards
 

  De : volga629
  
  Date : lundi 16 mars 2020 à 20:38
  À : Alain Bieuzent ,
  OpenSIPS users mailling list
  
  Objet : Re: [OpenSIPS-Users] opensips + rtpengine


   

Hello Alain,
 
port-min = 5000
port-max = 5
delete-delay = 5
timeout = 10
silent-timeout = 900
 
 
onreply_route[handle_media_reply] {
    xlog("incoming reply\n");
    if(is_method("INVITE|UPDATE") && t_check_status("200|183")) {
    if(has_body("application/sdp")) {
    rtpengine_answer("trust-address RTP/AVP replace-session-connection replace-origin ICE=remove");
    }
    }
    t_on_failure("media_delete_route");
}
 
failure_route[media_delete_route] {
    if(t_check_status("[56][0-9][0-9]|408|[60][0-9][0-9]")) {
    xlog("Call with Reply [$rs] make it close");
    rtpengine_delete();
    }
}
 
but rtpengine produce error 
 
Mar 16 17:46:40 Proxy /usr/sbin/opensips[11348]: ERROR:rtpengine:rtpe_function_call: proxy replied with error: Ran out of ports
Mar 16 17:46:40 Proxy /usr/sbin/opensips[11365]: ERROR:rtpengine:rtpe_function_call: proxy replied with error: Unknown call-id
 
volga629

  On 3/15/20 9:04 AM, Alain Bieuzent wrote:


  Hi,
   
  Can you share value of  delete-delay,
  port-min and port-max of your rtpengine configuration.
   
  Have you also check if you handle
  rtpengine_delete on failed calls (in case sip cause code
  4XX, 5XX and 6XX).
   
  At @job, we handle max 6000 calls on a 6
  cores servers without any issue.
   
  Regards
   
       
       
  
De : Users 
au nom de volga629 via Users 
Répondre à : volga629 ,
OpenSIPS users mailling list 
Date : vendredi 13 mars 2020 à 18:39
À : 
Objet : [OpenSIPS-Users] opensips + rtpengine
  
  
 
  
  Hello Everyone,
  Might be  somebody can
  point me to right place.
  Under load Rtpengine on
  server with 12 core can't pass 400 channels/sessions.
  Mar 13 18:14:53
  CentOS-77-64-minimal rtpengine[14588]: WARNING:
  [1b17077c-654e-11ea-bd31-87b1c8fc-849]: Protocol error in
  packet from 136.243.43.23:47763: Ran out of ports
  [d3:sdp289:
  WARNING:
  [1be05a46-654e-11ea-b136-573b6201-849]: Protocol error in
  packet from 136.243.43.23:55847: Unknown call-id
  [d3:sdp250:
  It like it not closing
  calls properly, but I am running  rtpengine_delete()  in
  loose _route on BYE or CANCEL.
   
  Here are more details
  
https://github.com/sipwise/rtpengine/issues/946
   
  # Handle requests within SIP
  dialogs
  route[handle_sequential] {
      if (has_totag()) {
      if (loose_route()) {
      # BYE rtpengine_delete()
      if (is_method("BYE|CANCEL")) {
      xlog("LOOSE_ROUTE:DBG: [$rm]
  trying delete rtpengine\n");
      rtpengine_delete();
      xlog("Average MOS of the entire
  call is $rtpstat(MOS-average)\r\n");
      xlog("Average MOS of caller is
  $(rtpstat(MOS-average)[$ft])\r\n");
      xlog("Average MOS of callee is
  $(rtpstat(MOS-average)[$tt])\r\n");
      xlog("Min MOS of caller is
  $(rtpstat(MOS-min)[$ft]) reported at
  $(rtpstat(MOS-min-at)[$ft])\r\n");
      }
      t_relay();
     

Re: [OpenSIPS-Users] opensips + rtpengine

2020-03-17 Thread volga629 via Users

  
  
Might dev team can take a look on  ticket
under rtpengine

  https://github.com/sipwise/rtpengine/issues/946
  

  
I wonder if any call id rewrites happened.
Because I can't make it work properly.


volga629


  


On 3/16/20 2:51 PM, volga629 via Users
  wrote:


  
  I tried test changes, but  not working
  100% yet
  

  Mar 16 17:46:40 Proxy
  /usr/sbin/opensips[11348]: ERROR:rtpengine:rtpe_function_call:
  proxy replied with error: Ran out of ports
  Mar 16 17:46:40 Proxy /usr/sbin/opensips[11365]:
  ERROR:rtpengine:rtpe_function_call: proxy replied with error:
  Unknown call-id

  volga629
  
  
  
  
  On 3/16/20 7:30 AM, volga629 wrote:
  
  

Thank you all for the answer.
I made the following changes .
Rtpengine  config 
  


port-min = 5000
port-max = 5
delete-delay = 5
timeout = 10
silent-timeout = 900

the question is 

num-threads = 
route[relay] {
    # for INVITEs enable some additional helper routes
    route(handle_media);
    t_relay();
    exit;
}
  
route[handle_media] {
   if(!is_method("INVITE|UPDATE|BYE|CANCEL"))
    return;
    # BYE
rtpengine_delete()
    if (is_method("BYE|CANCEL")) {
    xlog("LOOSE_ROUTE:DBG: [$rm] trying
delete rtpengine\n");
    rtpengine_delete("to-tag");
    xlog("Average MOS of the entire call
is $rtpstat(MOS-average)\r\n");
    xlog("Average MOS of caller is
$(rtpstat(MOS-average)[$ft])\r\n");
    xlog("Average MOS of callee is
$(rtpstat(MOS-average)[$tt])\r\n");
    xlog("Min MOS of caller is
$(rtpstat(MOS-min)[$ft]) reported at
$(rtpstat(MOS-min-at)[$ft])\r\n");
    }
    if(is_method("INVITE|UPDATE")
&& has_body("application/sdp")) {
    xlog("[$rm] Call going from WAN SouceIP
<$si> to LAN.\n");
    rtpengine_offer("RTP/AVP
replace-session-connection replace-origin ICE=remove");
    # Reset session timer for voicemail redirec
    $T_fr_inv_timeout = 55;
    t_on_reply("handle_media_reply");
    }
    if(is_method("ACK") &&
has_body("application/sdp")) {
    rtpengine_offer("RTP/AVP
replace-session-connection replace-origin ICE=remove");
    }
}
  

  
onreply_route[handle_media_reply] {
    xlog("incoming reply\n");
    if(is_method("INVITE|UPDATE") &&
t_check_status("200|183")) {
    if(has_body("application/sdp")) {
    rtpengine_answer("trust-address
RTP/AVP replace-session-connection replace-origin
ICE=remove");
    }
    }
    t_on_failure("media_delete_route");
}
  

  
failure_route[media_delete_route] {
    if(is_method("INVITE") &&
t_check_status("[56][0-9][0-9]|408|[60][0-9][0-9]")) {
    xlog("Call with Reply [$rs] make it close");
    rtpengine_delete();
    }
}
  


volga629



On 3/16/20 6:03 AM, Callum Guy
  wrote:


  I encountered a similar issue recently, I was using dialog variables
to flag sessions where RTPEngine is engaged so rtpengine_delete only
fired on applicable BYE/CANCEL requests. For reasons I have not yet
understood the dialog variable was not always available so the
sessions were left open and subject to an hours wait for the rtpengine
timeouts. I've tried to improve the logic with AVP's however I'm still
seeing unclosed sessions so am planning just to always fire it off on
a BYE/CANCEL and let RTPEngine drop requests when it is not engaged.
For your 

Re: [OpenSIPS-Users] opensips + rtpengine

2020-03-16 Thread volga629 via Users

  
  
Hello Alain,

port-min = 5000
port-max = 5
delete-delay = 5
timeout = 10
silent-timeout = 900


onreply_route[handle_media_reply] {
xlog("incoming reply\n");
if(is_method("INVITE|UPDATE") && t_check_status("200|183")) {
if(has_body("application/sdp")) {
rtpengine_answer("trust-address RTP/AVP replace-session-connection replace-origin ICE=remove");
}
}
t_on_failure("media_delete_route");
}

failure_route[media_delete_route] {
if(t_check_status("[56][0-9][0-9]|408|[60][0-9][0-9]")) {
xlog("Call with Reply [$rs] make it close");
rtpengine_delete();
}
}

but rtpengine produce error 

Mar 16 17:46:40 Proxy /usr/sbin/opensips[11348]: ERROR:rtpengine:rtpe_function_call: proxy replied with error: Ran out of ports
Mar 16 17:46:40 Proxy /usr/sbin/opensips[11365]: ERROR:rtpengine:rtpe_function_call: proxy replied with error: Unknown call-id

volga629

On 3/15/20 9:04 AM, Alain Bieuzent
  wrote:


  
  
  
  
Hi,
 
Can you share value of  delete-delay, port-min
and port-max of your rtpengine configuration.
 
Have you also check if you handle
rtpengine_delete on failed calls (in case sip cause code
4XX, 5XX and 6XX).
 
At @job, we handle max 6000 calls on a 6 cores
servers without any issue.
 
Regards
 
     
     

  De : Users
   au nom de
  volga629 via Users 
  Répondre à : volga629
  , OpenSIPS users mailling
  list 
  Date : vendredi 13 mars 2020 à 18:39
  À : 
  Objet : [OpenSIPS-Users] opensips + rtpengine


   

Hello
Everyone,
Might
be  somebody can point me to right place.
Under
load Rtpengine on server with 12 core can't pass 400
channels/sessions.
Mar 13
18:14:53 CentOS-77-64-minimal rtpengine[14588]: WARNING:
[1b17077c-654e-11ea-bd31-87b1c8fc-849]: Protocol error in
packet from 136.243.43.23:47763: Ran out of ports
[d3:sdp289:
WARNING:
[1be05a46-654e-11ea-b136-573b6201-849]: Protocol error in
packet from 136.243.43.23:55847: Unknown call-id [d3:sdp250:
It like
it not closing calls properly, but I am running 
rtpengine_delete()  in loose _route on BYE or CANCEL.
 
Here
are more details

  https://github.com/sipwise/rtpengine/issues/946
 
# Handle
requests within SIP dialogs
route[handle_sequential] {
    if (has_totag()) {
    if (loose_route()) {
    # BYE rtpengine_delete()
    if (is_method("BYE|CANCEL")) {
    xlog("LOOSE_ROUTE:DBG: [$rm] trying
delete rtpengine\n");
    rtpengine_delete();
    xlog("Average MOS of the entire call
is $rtpstat(MOS-average)\r\n");
    xlog("Average MOS of caller is
$(rtpstat(MOS-average)[$ft])\r\n");
    xlog("Average MOS of callee is
$(rtpstat(MOS-average)[$tt])\r\n");
    xlog("Min MOS of caller is
$(rtpstat(MOS-min)[$ft]) reported at
$(rtpstat(MOS-min-at)[$ft])\r\n");
    }
    t_relay();
    exit;
volga629
___
  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 + rtpengine

2020-03-16 Thread volga629 via Users
!



On Sun, 15 Mar 2020 at 12:05, Alain Bieuzent  wrote:


  Hi,



Can you share value of  delete-delay, port-min and port-max of your rtpengine configuration.



Have you also check if you handle rtpengine_delete on failed calls (in case sip cause code 4XX, 5XX and 6XX).



At @job, we handle max 6000 calls on a 6 cores servers without any issue.



Regards







De : Users  au nom de volga629 via Users 
Répondre à : volga629 , OpenSIPS users mailling list 
Date : vendredi 13 mars 2020 à 18:39
À : 
Objet : [OpenSIPS-Users] opensips + rtpengine



Hello Everyone,

Might be  somebody can point me to right place.

Under load Rtpengine on server with 12 core can't pass 400 channels/sessions.

Mar 13 18:14:53 CentOS-77-64-minimal rtpengine[14588]: WARNING: [1b17077c-654e-11ea-bd31-87b1c8fc-849]: Protocol error in packet from 136.243.43.23:47763: Ran out of ports [d3:sdp289:

WARNING: [1be05a46-654e-11ea-b136-573b6201-849]: Protocol error in packet from 136.243.43.23:55847: Unknown call-id [d3:sdp250:

It like it not closing calls properly, but I am running  rtpengine_delete()  in loose _route on BYE or CANCEL.



Here are more details


https://github.com/sipwise/rtpengine/issues/946



# Handle requests within SIP dialogs
route[handle_sequential] {
if (has_totag()) {
if (loose_route()) {
# BYE rtpengine_delete()
if (is_method("BYE|CANCEL")) {
xlog("LOOSE_ROUTE:DBG: [$rm] trying delete rtpengine\n");
rtpengine_delete();
xlog("Average MOS of the entire call is $rtpstat(MOS-average)\r\n");
xlog("Average MOS of caller is $(rtpstat(MOS-average)[$ft])\r\n");
xlog("Average MOS of callee is $(rtpstat(MOS-average)[$tt])\r\n");
xlog("Min MOS of caller is $(rtpstat(MOS-min)[$ft]) reported at $(rtpstat(MOS-min-at)[$ft])\r\n");
}
t_relay();
exit;

volga629

___ 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] opensips + rtpengine

2020-03-16 Thread volga629 via Users

  
  
Thank you all for the answer.
I made the following changes .
Rtpengine  config 
  


port-min = 5000
port-max = 5
delete-delay = 5
timeout = 10
silent-timeout = 900

the question is 

num-threads = 
route[relay] {
    # for INVITEs enable some additional helper routes
    route(handle_media);
    t_relay();
    exit;
}
  
route[handle_media] {
   if(!is_method("INVITE|UPDATE|BYE|CANCEL"))
    return;
    # BYE rtpengine_delete()
    if (is_method("BYE|CANCEL")) {
    xlog("LOOSE_ROUTE:DBG: [$rm] trying
delete rtpengine\n");
    rtpengine_delete("to-tag");
    xlog("Average MOS of the entire call is
$rtpstat(MOS-average)\r\n");
    xlog("Average MOS of caller is
$(rtpstat(MOS-average)[$ft])\r\n");
    xlog("Average MOS of callee is
$(rtpstat(MOS-average)[$tt])\r\n");
    xlog("Min MOS of caller is
$(rtpstat(MOS-min)[$ft]) reported at
$(rtpstat(MOS-min-at)[$ft])\r\n");
    }
    if(is_method("INVITE|UPDATE")
&& has_body("application/sdp")) {
    xlog("[$rm] Call going from WAN SouceIP
<$si> to LAN.\n");
    rtpengine_offer("RTP/AVP
replace-session-connection replace-origin ICE=remove");
    # Reset session timer for voicemail redirec
    $T_fr_inv_timeout = 55;
    t_on_reply("handle_media_reply");
    }
    if(is_method("ACK") &&
has_body("application/sdp")) {
    rtpengine_offer("RTP/AVP
replace-session-connection replace-origin ICE=remove");
    }
}
  

  
onreply_route[handle_media_reply] {
    xlog("incoming reply\n");
    if(is_method("INVITE|UPDATE") &&
t_check_status("200|183")) {
    if(has_body("application/sdp")) {
    rtpengine_answer("trust-address RTP/AVP
replace-session-connection replace-origin ICE=remove");
    }
    }
    t_on_failure("media_delete_route");
}
  

  
failure_route[media_delete_route] {
    if(is_method("INVITE") &&
t_check_status("[56][0-9][0-9]|408|[60][0-9][0-9]")) {
    xlog("Call with Reply [$rs] make it close");
    rtpengine_delete();
    }
}
  


volga629



On 3/16/20 6:03 AM, Callum Guy wrote:


  I encountered a similar issue recently, I was using dialog variables
to flag sessions where RTPEngine is engaged so rtpengine_delete only
fired on applicable BYE/CANCEL requests. For reasons I have not yet
understood the dialog variable was not always available so the
sessions were left open and subject to an hours wait for the rtpengine
timeouts. I've tried to improve the logic with AVP's however I'm still
seeing unclosed sessions so am planning just to always fire it off on
a BYE/CANCEL and let RTPEngine drop requests when it is not engaged.
For your script I would recommend that you take the delete function
out of loose routing and implement it whenever you have BYE/CANCEL
requests arriving. I would also highly recommend that you enable the
rtpengine CLI so you are able to control session limits on a running
instance.

Alain, thanks for your anecdotal stats - I've been wondering how far
we'll be able to push an instance of RTPEngine. We have some powerful
24 core machines and are using the packet forwarding module and are
hoping to approach 1 sessions per instance. If your figures scale
up it sounds like this is very achievable!



On Sun, 15 Mar 2020 at 12:05, Alain Bieuzent  wrote:

  

Hi,



Can you share value of  delete-delay, port-min and port-max of your rtpengine configuration.



Have you also check if you handle rtpengine_delete on failed calls (in case sip cause code 4XX, 5XX and 6XX).



At @job, we handle max 6000 calls on a 6 cores servers without any issue.



Regards







De : Users  au nom de volga629 via Users 
Répondre à : volga629 , OpenSIPS users mailling list 
Date : vendredi 13 mars 2020 à 18:39
À : 
Objet : [OpenSIPS-Users] opensips + rtpengine



Hello Everyone,

Might be  somebody can point me to right place.

Under load Rtpengine o

[OpenSIPS-Users] opensips + rtpengine

2020-03-13 Thread volga629 via Users

  
  
Hello Everyone,
Might be  somebody can point me to right
place.
Under load Rtpengine on server with 12
core can't pass 400 channels/sessions.
Mar 13 18:14:53 CentOS-77-64-minimal
rtpengine[14588]: WARNING:
[1b17077c-654e-11ea-bd31-87b1c8fc-849]: Protocol error in packet
from 136.243.43.23:47763: Ran out of ports [d3:sdp289:
WARNING:
[1be05a46-654e-11ea-b136-573b6201-849]: Protocol error in packet
from 136.243.43.23:55847: Unknown call-id [d3:sdp250:
  
It like it not closing calls properly, but
I am running  rtpengine_delete()  in loose _route on BYE or
CANCEL.

  
Here are more details

  https://github.com/sipwise/rtpengine/issues/946

  
# Handle requests within SIP dialogs
route[handle_sequential] {
    if (has_totag()) {
    if (loose_route()) {
    # BYE rtpengine_delete()
    if (is_method("BYE|CANCEL")) {
    xlog("LOOSE_ROUTE:DBG: [$rm] trying
delete rtpengine\n");
    rtpengine_delete();
    xlog("Average MOS of the entire call is
$rtpstat(MOS-average)\r\n");
    xlog("Average MOS of caller is
$(rtpstat(MOS-average)[$ft])\r\n");
    xlog("Average MOS of callee is
$(rtpstat(MOS-average)[$tt])\r\n");
    xlog("Min MOS of caller is
$(rtpstat(MOS-min)[$ft]) reported at
$(rtpstat(MOS-min-at)[$ft])\r\n");
    }
    t_relay();
    exit;

  
volga629
  
  


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


Re: [OpenSIPS-Users] opensips cli centos 7

2020-03-11 Thread volga629 via Users

  
  
Thank you for quick fix.
volga629

On 3/11/20 9:24 AM, Nick Altmann wrote:


  
  
Now it's fixed. Try latest nightly build please.


  ср, 4 мар. 2020 г. в 08:13,
volga629 via Users <users@lists.opensips.org>:
  
  

  Hello Everyone,
  Opensips Cli  on centos 7
  installation  not working. Dependency names should be
  python36 not python3 .
  

  --> Processing Dependency:
  python3-sqlalchemy for package:
  opensips-cli-0.1-1.noarch
  --> Processing Dependency: python3-sqlalchemy-utils
  for package: opensips-cli-0.1-1.noarch
  --> Processing Dependency: python3-mysql for
  package: opensips-cli-0.1-1.noarch
  --> Processing Dependency: python3-pyOpenSSL for
  package: opensips-cli-0.1-1.noarch
  --> Finished Dependency Resolution
  Error: Package: opensips-cli-0.1-1.noarch
  (opensips-cli-release)
     Requires: python3-sqlalchemy
  Error: Package: opensips-cli-0.1-1.noarch
  (opensips-cli-release)
     Requires: python3-sqlalchemy-utils
  Error: Package: opensips-cli-0.1-1.noarch
  (opensips-cli-release)
     Requires: python3-pyOpenSSL
  Error: Package: opensips-cli-0.1-1.noarch
  (opensips-cli-release)
     Requires: python3-mysql

  

  volga629
  

___
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] opensips cli centos 7

2020-03-03 Thread volga629 via Users

  
  
Hello Everyone,
Opensips Cli  on centos 7 installation 
not working. Dependency names should be python36 not python3 .

  
--> Processing Dependency:
python3-sqlalchemy for package: opensips-cli-0.1-1.noarch
--> Processing Dependency: python3-sqlalchemy-utils for
package: opensips-cli-0.1-1.noarch
--> Processing Dependency: python3-mysql for package:
opensips-cli-0.1-1.noarch
--> Processing Dependency: python3-pyOpenSSL for package:
opensips-cli-0.1-1.noarch
--> Finished Dependency Resolution
Error: Package: opensips-cli-0.1-1.noarch (opensips-cli-release)
   Requires: python3-sqlalchemy
Error: Package: opensips-cli-0.1-1.noarch (opensips-cli-release)
   Requires: python3-sqlalchemy-utils
Error: Package: opensips-cli-0.1-1.noarch (opensips-cli-release)
   Requires: python3-pyOpenSSL
Error: Package: opensips-cli-0.1-1.noarch (opensips-cli-release)
   Requires: python3-mysql
  

  
volga629

  


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


Re: [OpenSIPS-Users] opensips lua

2020-01-27 Thread volga629 via Users

Hello Razvan,
Ticket <https://github.com/OpenSIPS/opensips/issues/1946>

volga629.

On Mon, Jan 27, 2020 at 10:31, Răzvan Crainea  
wrote:
Please open a ticket with this issue, as this seems to be a 
regression during porting to lua 5.2/5.3.

In the meantime, please continue using lua5.1.

Best regards,
Răzvan

On 1/24/20 6:32 PM, volga629 via Users wrote:

Hello Vlad,
In latest master  was added support for 5.2 and 5.3, wrapper  
produce error.

So it can't open python scripts.


Any help thank you.

Jan 24 17:24:35 dev1-fr /usr/sbin/opensips[26796]: siplua: 
encode:UTF16BE:fjhqqq
Jan 24 17:24:35 dev1-fr /usr/sbin/opensips[26796]: siplua: siplua 
error running function arg_function: 
/etc/opensips/scripts/convert.lua:15: attempt to index a nil value 
(global 'io')
Jan 24 17:24:35 dev1-fr /usr/sbin/opensips[26796]: 
DBG:core:destroy_index_avp: AVP with the specified index not found


volga629

On Sun, Jan 19, 2020 at 10:11, volga629 via Users 
mailto:users@lists.opensips.org>> wrote:

Hello Vlad,
Thank you for pointing out. I adjusted as following and it resolve 
the issue


if sys.argv[2] == "encode":
print(encoding().strip())
elif sys.argv[2] == "decode":
print(decoding().strip())
elif sys.argv[2] == "test":
print(testing().strip())

volga629

On Tue, Jan 14, 2020 at 17:03, Vlad Patrascu <mailto:vl...@opensips.org>> wrote:


You get the newline from the print() function in the python script 
that you call. I've tested with your script and for example 
this fixed it:


print(testing(),end="")

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>

On 1/14/20 3:32 PM, volga629 via Users wrote:

Hello Vlad,
In lua script  we use \n only in xlog.

this repository

<https://github.com/VoIP-SAAS/opensips-smpp-lua>

On Tue, Jan 14, 2020 at 13:37, Vlad Patrascu <mailto:vl...@opensips.org>> wrote:


I still don't think it is AVP_set function's fault for the 
whitespaces. Make sure that the string you produce in lua 
and want to return to opensips doesn't have a newline 
character at the end. It seems that syslog prints a newline 
as "#012" sometimes (if it's not actually at the end of a 
message).


Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>

On 1/13/20 3:26 PM, volga629 via Users wrote:

Hello Vlad,
Yes, it still in issue, but we have work around.  #012 it 
insert white spaces.


$avp(sms-out) = $(avp(formatted-msg){s.trimr});

On Mon, Jan 13, 2020 at 12:26, Vlad Patrascu 
mailto:vl...@opensips.org>> wrote:


Hi Volga,

Sorry for getting to this so late. Do you still encounter this 
issue? I have tried to reproduce this myself but it 
seems that AVP_set() does set the value correctly.


Regards,

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>

On 12/14/19 7:12 AM, volga629 via Users wrote:

Hello Everyone,
Having some issue get lua to set proper avp.  When it set in 
insert some extra characters into value of avp

Here are log


Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: 
test::w nah.uy/u5bmnc
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: 
Tested string ~>0
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: 
SMS_ROUTE_IN: Test string ~> [0#012]


It insert #012

Lua script

local cmd_var = handle:read("*all")
handle:close()
xlog("Tested string ~> " .. cmd_var .. "\n")
r eturn AVP_set("test-str", cmd_var)

Any help thank you

volga629

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


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


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


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



--
Răzvan Crainea
OpenSIPS Core Developer
  http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>


___
Users mailing list
Users@lists.opensips.org <mailto: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 lua

2020-01-24 Thread volga629 via Users

Hello Vlad,
In latest master  was added support for 5.2 and 5.3, wrapper  produce 
error.

So it can't open python scripts.


Any help thank you.

Jan 24 17:24:35 dev1-fr /usr/sbin/opensips[26796]: siplua: 
encode:UTF16BE:fjhqqq
Jan 24 17:24:35 dev1-fr /usr/sbin/opensips[26796]: siplua: siplua error 
running function arg_function: /etc/opensips/scripts/convert.lua:15: 
attempt to index a nil value (global 'io')
Jan 24 17:24:35 dev1-fr /usr/sbin/opensips[26796]: 
DBG:core:destroy_index_avp: AVP with the specified index not found


volga629

On Sun, Jan 19, 2020 at 10:11, volga629 via Users 
 wrote:

Hello Vlad,
Thank you for pointing out. I adjusted as following and it resolve 
the issue


if sys.argv[2] == "encode":
print(encoding().strip())
elif sys.argv[2] == "decode":
print(decoding().strip())
elif sys.argv[2] == "test":
print(testing().strip())

volga629

On Tue, Jan 14, 2020 at 17:03, Vlad Patrascu  
wrote:
You get the newline from the print() function in the python script 
that you call. I've tested with your script and for example this 
fixed it:


print(testing(),end="")

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>

On 1/14/20 3:32 PM, volga629 via Users wrote:

Hello Vlad,
In lua script  we use \n only in xlog.

this repository

<https://github.com/VoIP-SAAS/opensips-smpp-lua>

 On Tue, Jan 14, 2020 at 13:37, Vlad Patrascu  
<mailto:vl...@opensips.org> wrote:
I still don't think it is AVP_set function's fault for the 
whitespaces. Make sure that the string you produce in lua and want 
to return to opensips doesn't have a newline character at the end. 
It seems that syslog prints a newline as "#012" sometimes (if it's 
not actually at the end of a message).


Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>

On 1/13/20 3:26 PM, volga629 via Users wrote:

Hello Vlad,
Yes, it still in issue, but we have work around.  #012 it insert 
white spaces.


$avp(sms-out) = $(avp(formatted-msg){s.trimr});

 On Mon, Jan 13, 2020 at 12:26, Vlad Patrascu 
 <mailto:vl...@opensips.org> wrote:

Hi Volga,

Sorry for getting to this so late. Do you still encounter this 
issue? I have tried to reproduce this myself but it seems that 
AVP_set() does set the value correctly.


Regards,

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>

On 12/14/19 7:12 AM, volga629 via Users wrote:

Hello Everyone,
Having some issue get lua to set proper avp.  When it set in 
insert some extra characters into value of avp

Here are log


Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: 
test::w nah.uy/u5bmnc
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: 
Tested string ~>0
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: 
SMS_ROUTE_IN: Test string ~> [0#012]


It insert #012

Lua script

local cmd_var = handle:read("*all")
handle:close()
xlog("Tested string ~> " .. cmd_var .. "\n")
r eturn AVP_set("test-str", cmd_var)

Any help thank you

volga629

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


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


___
Users mailing list
Users@lists.opensips.org <mailto: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] flags

2020-01-21 Thread volga629 via Users

Hello Everyone,
In latest master what change is require right now to accommodate all 
flags functions. Script file test produce


if(isflagset(FLAG_FROM_PEER)) {


Jan 21 23:16:55 [11734] CRITICAL:core:yyerror: parse error in 
/etc/opensips/opensips.cfg:342:18-19: bad arguments for command 

Jan 21 23:16:55 [11734] CRITICAL:core:yyerror: parse error in 
/etc/opensips/opensips.cfg:347:22-34: syntax error
Jan 21 23:16:55 [11734] CRITICAL:core:yyerror: parse error in 
/etc/opensips/opensips.cfg:347:34-35: bad arguments for command 

Jan 21 23:16:55 [11734] CRITICAL:core:yyerror: parse error in 
/etc/opensips/opensips.cfg:400:33-47: syntax error
Jan 21 23:16:55 [11734] CRITICAL:core:yyerror: parse error in 
/etc/opensips/opensips.cfg:400:47-48: bad arguments for command 

Jan 21 23:16:55 [11734] CRITICAL:core:yyerror: parse error in 
/etc/opensips/opensips.cfg:402:13-25: syntax error
Jan 21 23:16:55 [11734] CRITICAL:core:yyerror: parse error in 
/etc/opensips/opensips.cfg:402:25-26: bad arguments for command 



volga629

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


Re: [OpenSIPS-Users] opensips lua

2020-01-19 Thread volga629 via Users

Hello Vlad,
Thank you for pointing out. I adjusted as following and it resolve the 
issue


if sys.argv[2] == "encode":
   print(encoding().strip())
elif sys.argv[2] == "decode":
   print(decoding().strip())
elif sys.argv[2] == "test":
   print(testing().strip())

volga629

On Tue, Jan 14, 2020 at 17:03, Vlad Patrascu  wrote:
You get the newline from the print() function in the python script 
that you call. I've tested with your script and for example this 
fixed it:


print(testing(),end="")

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
On 1/14/20 3:32 PM, volga629 via Users wrote:

Hello Vlad,
In lua script  we use \n only in xlog.

this repository

<https://github.com/VoIP-SAAS/opensips-smpp-lua>

 On Tue, Jan 14, 2020 at 13:37, Vlad Patrascu  
<mailto:vl...@opensips.org> wrote:
I still don't think it is AVP_set function's fault for the 
whitespaces. Make sure that the string you produce in lua and want 
to return to opensips doesn't have a newline character at the end. 
It seems that syslog prints a newline as "#012" sometimes (if it's 
not actually at the end of a message).


Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>

On 1/13/20 3:26 PM, volga629 via Users wrote:

Hello Vlad,
Yes, it still in issue, but we have work around.  #012 it insert 
white spaces.


$avp(sms-out) = $(avp(formatted-msg){s.trimr});

 On Mon, Jan 13, 2020 at 12:26, Vlad Patrascu  
<mailto:vl...@opensips.org> wrote:

Hi Volga,

Sorry for getting to this so late. Do you still encounter this 
issue? I have tried to reproduce this myself but it seems that 
AVP_set() does set the value correctly.


Regards,

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>

On 12/14/19 7:12 AM, volga629 via Users wrote:

Hello Everyone,
Having some issue get lua to set proper avp.  When it set in 
insert some extra characters into value of avp

Here are log


Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: 
test::w nah.uy/u5bmnc
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: 
Tested string ~>0
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: SMS_ROUTE_IN: 
Test string ~> [0#012]


It insert #012

Lua script

local cmd_var = handle:read("*all")
handle:close()
xlog("Tested string ~> " .. cmd_var .. "\n")
r eturn AVP_set("test-str", cmd_var)

Any help thank you

volga629

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


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


___
Users mailing list
Users@lists.opensips.org <mailto: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 lua

2020-01-14 Thread volga629 via Users

Hello Vlad,
In lua script  we use \n only in xlog.

this repository

<https://github.com/VoIP-SAAS/opensips-smpp-lua>

On Tue, Jan 14, 2020 at 13:37, Vlad Patrascu  wrote:
I still don't think it is AVP_set function's fault for the 
whitespaces. Make sure that the string you produce in lua and want to 
return to opensips doesn't have a newline character at the end. It 
seems that syslog prints a newline as "#012" sometimes (if it's not 
actually at the end of a message).


Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
On 1/13/20 3:26 PM, volga629 via Users wrote:

Hello Vlad,
Yes, it still in issue, but we have work around.  #012 it insert 
white spaces.


$avp(sms-out) = $(avp(formatted-msg){s.trimr});

 On Mon, Jan 13, 2020 at 12:26, Vlad Patrascu  
<mailto:vl...@opensips.org> wrote:

Hi Volga,

Sorry for getting to this so late. Do you still encounter this 
issue? I have tried to reproduce this myself but it seems that 
AVP_set() does set the value correctly.


Regards,

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>

On 12/14/19 7:12 AM, volga629 via Users wrote:

Hello Everyone,
Having some issue get lua to set proper avp.  When it set in 
insert some extra characters into value of avp

Here are log


Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: 
test::w nah.uy/u5bmnc
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: Tested 
string ~>0
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: SMS_ROUTE_IN: 
Test string ~> [0#012]


It insert #012

Lua script

local cmd_var = handle:read("*all")
handle:close()
xlog("Tested string ~> " .. cmd_var .. "\n")
r eturn AVP_set("test-str", cmd_var)

Any help thank you

volga629

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


___
Users mailing list
Users@lists.opensips.org <mailto: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 lua

2020-01-13 Thread volga629 via Users

Hello Vlad,
Yes, it still in issue, but we have work around.  #012 it insert white 
spaces.


$avp(sms-out) = $(avp(formatted-msg){s.trimr});

On Mon, Jan 13, 2020 at 12:26, Vlad Patrascu  wrote:

Hi Volga,

Sorry for getting to this so late. Do you still encounter this issue? 
I have tried to reproduce this myself but it seems that AVP_set() 
does set the value correctly.


Regards,

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>
On 12/14/19 7:12 AM, volga629 via Users wrote:

Hello Everyone,
Having some issue get lua to set proper avp.  When it set in insert 
some extra characters into value of avp

Here are log


Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: 
test::w nah.uy/u5bmnc
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: Tested 
string ~>0
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: SMS_ROUTE_IN: 
Test string ~> [0#012]


It insert #012

Lua script

local cmd_var = handle:read("*all")
handle:close()
xlog("Tested string ~> " .. cmd_var .. "\n")
r eturn AVP_set("test-str", cmd_var)

Any help thank you

volga629

___
Users mailing list
Users@lists.opensips.org <mailto: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] gsm modem SMS module

2020-01-08 Thread volga629 via Users

Hello Bogdan,
Yes I think module need to be refactored , I can't get any useful 
information from debug. All what I see that opensips access modem, but 
actually it can't pass even init properly. I tested with kannel and it 
works 100%.


I used command lsof -u opensips | grep -i usb that show me that 
opensips keep device open.


volga629

On Sat, Jan 4, 2020 at 17:35, Bogdan-Andrei Iancu  
wrote:
You should see some DBG log with "opening modem" - this is the very 
beginning of the modem init sequence. Try to grab all the logs (from 
the same proc) starting with that line.


 Regards,
Bogdan-Andrei Iancu

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


OpenSIPS Summit, Amsterdam, May 2020
  
OpenSIPS Bootcamp, Miami, March 2020
  

On 1/4/20 5:19 PM, volga...@networklab.ca 
 wrote:

In debug level 4 I see

Jan  4 12:15:43 sms opensips: Jan  4 12:15:43 [21648] 
ERROR:sms:initmodem: Modem is not registered to the network
Jan  4 12:15:43 sms opensips: Jan  4 12:15:43 [21648] 
INFO:sms:put_command : Modem is not clear to 
send
Jan  4 12:15:43 sms opensips: Jan  4 12:15:43 [21649] 
DBG:freeswitch:apply_socket_commands: applying FS socket commands
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
INFO:sms:put_command : Modem is not clear to 
send
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
WARNING:sms:checkmodem: modem wants the PIN again!
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
WARNING:sms:checkmodem: re -init the modem!!
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
INFO:sms:initmodem : init modem ZTE on 
/dev/ttyUSB1.
Jan  4 12:15: 44 sms opensips: Jan  4 12:15:44 [21649] 
DBG:freeswitch:apply_socket_commands: applying FS socket commands
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
INFO:sms:put_command : Modem is not clear to 
send
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
INFO:sms:initmodem : INFO:initmodem 
: Checking if Modem is registered to the network


But not really true, because wvdialconf is report ok

[root@sms ~]# wvdialconf
Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

Modem Port Scan<*1>: S0   S1   S2   S3
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyUSB1<*1>: ATQ0 V1 E1 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0  -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0   -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0   +FCLASS=0 -- OK
ttyUSB1<*1>: Modem Identifier: ATI -- Manufacturer: ZTE INCORPORATED
ttyUSB1<*1>: Speed 9600: AT -- OK
ttyUSB1<*1>: Max speed is 9600; that should be safe.
ttyUSB1<*1>: ATQ0 V1 E1 S0=0   +FCLASS=0 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0  -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0   -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0   +FCLASS=0 -- OK
ttyUSB2< *1>: Modem Identifier: ATI -- Manufacturer: ZTE INCORPORATED
ttyUSB2<*1>: Speed 9600: AT -- OK
ttyUSB2<*1>: Max speed is 9600; that should be safe.
ttyUSB2<*1>: ATQ0 V1 E1 S0=0   +FCLASS=0 -- OK

Found a modem on /dev/ttyUSB1.
Modem configuration written to /etc/wvdial.conf.
ttyUSB1: Speed 9600; init "ATQ0 V1 E1 S0=0   +FCLASS=0"
ttyUSB2: Speed 9600; init "ATQ0 V1 E1 S0=0   +FCLASS=0"

volga629





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


Re: [OpenSIPS-Users] proto smpp inbound

2020-01-08 Thread volga629 via Users

Hello Everyone,
Is proto smpp should work with inbound binding as smpp server ?

volga629

On Sun, Jan 5, 2020 at 01:50, volga629 via Users 
 wrote:
Getting this error where  none of the smpp clients can't bind to 
opensips

Seems like issue related to github


<https://github.com/OpenSIPS/opensips/issues/1807>


Jan  5 02:40:27 sms /usr/sbin/opensips[6760]: 
INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
Jan  5 02:40:27 sms /usr/sbin/opensips[6760]: 
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 526
Jan  5 02:40:27 sms /usr/sbin/opensips[6760]: 
INFO:proto_smpp:smpp_conn_init: smpp_conn_init called
Jan  5 02:40:27 sms /usr/sbin/opensips[6690]: 
ERROR:proto_smpp:handle_bind_transceiver_cmd: NULL params



This example jasmin SMS log where it try binds as client to opensips 
SMPP server


2020-01-05 02:40:27 INFO 15172 Establishing TCP connection to 
192.168.1.30:2776
2020-01-05 02:40:27 INFO 15172 Connecting to IPv4Address(TCP, 
'192.168.1.30', 2776) ...
2020-01-05 02:40:27 WARNING  15172 SMPP connection established from 
192.168.1.30 to port 51066
2020-01-05 02:40:27 INFO 15172 Connection made to 
192.168.1.30:2776

2020-01-05 02:40:27 WARNING  15172 Requesting bind as transceiver
2020-01-05 02:40:57 ERROR15172 Request timed out after 30 secs: 
PDU [command: bind_transceiver, sequence_number: 1, command_status: 
ESME_ROK

system_id: ''
password: ''
system_type: ''
interface_version: 52
addr_ton: EnumValue(0x7f76c8754ed0>, 3, 'UNKNOWN')
addr_npi: EnumValue(0x7f76c875b290>, 4, 'UNKNOWN')

address_range: None
]
2020-01-05 02:40:57 ERROR15172 Bind failed [[Failure instance: 
Traceback (failure with no frames): 'jasmin.vendor.smpp.pdu.error.SMPPRequestTimoutError'>: Request timed 
out after 30 secs: PDU [command: bind_transceiver, sequence_number: 
1, command_status: ESME_ROK



volga629

On Fri, Jan 3, 2020 at 23:32, volga629 via Users 
 wrote:

Hello Everyone,
I am trying inbound proto smpp bind as transmitter and connection 
failing.

Opensips as ESME (External Short Messaging Entity).

Jan  3 23:48:05 sms /usr/sbin/opensips[13242]: 
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 527
< div>Jan  3 23:48:05 sms /usr/sbin/opensips[13242]: 
INFO:proto_smpp:smpp_conn_init: smpp_conn_init called
Jan  3 23:48:05 sms /usr/sbin/opensips[13140]: 
ERROR:proto_smpp:handle_bind_transmitter_cmd: NULL params
Jan  3 23:48:10 sms /usr/sbin/opensips[13242]: 
INFO:proto_smpp:smpp_conn_clean: smpp_conn_clean called


It loading both connections as client, but not as server

Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: INFO:proto_s 
mpp:load_smpp_sessions_from_db: Loaded 2 SMSc servers
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:proto_smpp:send_bind: binding session with system_id 
"smppclient"
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 6
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:proto_smpp:smpp_conn_init: smpp_conn_init called


How to load server connections ?

volga629



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


Re: [OpenSIPS-Users] proto smpp inbound

2020-01-04 Thread volga629 via Users
Getting this error where  none of the smpp clients can't bind to 
opensips

Seems like issue related to github


<https://github.com/OpenSIPS/opensips/issues/1807>


Jan  5 02:40:27 sms /usr/sbin/opensips[6760]: 
INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
Jan  5 02:40:27 sms /usr/sbin/opensips[6760]: 
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 526
Jan  5 02:40:27 sms /usr/sbin/opensips[6760]: 
INFO:proto_smpp:smpp_conn_init: smpp_conn_init called
Jan  5 02:40:27 sms /usr/sbin/opensips[6690]: 
ERROR:proto_smpp:handle_bind_transceiver_cmd: NULL params



This example jasmin SMS log where it try binds as client to opensips 
SMPP server


2020-01-05 02:40:27 INFO 15172 Establishing TCP connection to 
192.168.1.30:2776
2020-01-05 02:40:27 INFO 15172 Connecting to IPv4Address(TCP, 
'192.168.1.30', 2776) ...
2020-01-05 02:40:27 WARNING  15172 SMPP connection established from 
192.168.1.30 to port 51066

2020-01-05 02:40:27 INFO 15172 Connection made to 192.168.1.30:2776
2020-01-05 02:40:27 WARNING  15172 Requesting bind as transceiver
2020-01-05 02:40:57 ERROR15172 Request timed out after 30 secs: PDU 
[command: bind_transceiver, sequence_number: 1, command_status: ESME_ROK

system_id: ''
password: ''
system_type: ''
interface_version: 52
addr_ton: EnumValue(, 
3, 'UNKNOWN')
addr_npi: EnumValue(, 
4, 'UNKNOWN')

address_range: None
]
2020-01-05 02:40:57 ERROR15172 Bind failed [[Failure instance: 
Traceback (failure with no frames): 'jasmin.vendor.smpp.pdu.error.SMPPRequestTimoutError'>: Request timed 
out after 30 secs: PDU [command: bind_transceiver, sequence_number: 1, 
command_status: ESME_ROK



volga629

On Fri, Jan 3, 2020 at 23:32, volga629 via Users 
 wrote:

Hello Everyone,
I am trying inbound proto smpp bind as transmitter and connection 
failing.

Opensips as ESME (External Short Messaging Entity).

Jan  3 23:48:05 sms /usr/sbin/opensips[13242]: 
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 527
Jan  3 23:48:05 sms /usr/sbin/opensips[13242]: 
INFO:proto_smpp:smpp_conn_init: smpp_conn_init called
Jan  3 23:48:05 sms /usr/sbin/opensips[13140]: 
ERROR:proto_smpp:handle_bind_transmitter_cmd: NULL params
Jan  3 23:48:10 sms /usr/sbin/opensips[13242]: 
INFO:proto_smpp:smpp_conn_clean: smpp_conn_clean called


It loading both connections as client, but not as server

Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: INFO:proto_s 
mpp:load_smpp_sessions_from_db: Loaded 2 SMSc servers
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:proto_smpp:send_bind: binding session with system_id "smppclient"
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 6
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:proto_smpp:smpp_conn_init: smpp_conn_init called


How to load server connections ?

volga629



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


Re: [OpenSIPS-Users] gsm modem SMS module

2020-01-04 Thread volga629 via Users

In debug level 4 I see

Jan  4 12:15:43 sms opensips: Jan  4 12:15:43 [21648] 
ERROR:sms:initmodem: Modem is not registered to the network
Jan  4 12:15:43 sms opensips: Jan  4 12:15:43 [21648] 
INFO:sms:put_command: Modem is not clear to send
Jan  4 12:15:43 sms opensips: Jan  4 12:15:43 [21649] 
DBG:freeswitch:apply_socket_commands: applying FS socket commands
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
INFO:sms:put_command: Modem is not clear to send
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
WARNING:sms:checkmodem: modem wants the PIN again!
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
WARNING:sms:checkmodem: re -init the modem!!
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
INFO:sms:initmodem: init modem ZTE on /dev/ttyUSB1.
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21649] 
DBG:freeswitch:apply_socket_commands: applying FS socket commands
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
INFO:sms:put_command: Modem is not clear to send
Jan  4 12:15:44 sms opensips: Jan  4 12:15:44 [21648] 
INFO:sms:initmodem: INFO:initmodem: Checking if Modem is registered to 
the network


But not really true, because wvdialconf is report ok

[root@sms ~]# wvdialconf
Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

Modem Port Scan<*1>: S0   S1   S2   S3
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyUSB1<*1>: ATQ0 V1 E1 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0  -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0   -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0   +FCLASS=0 -- OK
ttyUSB1<*1>: Modem Identifier: ATI -- Manufacturer: ZTE INCORPORATED
ttyUSB1<*1>: Speed 9600: AT -- OK
ttyUSB1<*1>: Max speed is 9600; that should be safe.
ttyUSB1<*1>: ATQ0 V1 E1 S0=0   +FCLASS=0 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0  -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0   -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0   +FCLASS=0 -- OK
ttyUSB2<*1>: Modem Identifier: ATI -- Manufacturer: ZTE INCORPORATED
ttyUSB2<*1>: Speed 9600: AT -- OK
ttyUSB2<*1>: Max speed is 9600; that should be safe.
ttyUSB2<*1>: ATQ0 V1 E1 S0=0   +FCLASS=0 -- OK

Found a modem on /dev/ttyUSB1.
Modem configuration written to /etc/wvdial.conf.
ttyUSB1: Speed 9600; init "ATQ0 V1 E1 S0=0   +FCLASS=0"
ttyUSB2: Speed 9600; init "ATQ0 V1 E1 S0=0   +FCLASS=0"

volga629

On Sat, Jan 4, 2020 at 17:07, Bogdan-Andrei Iancu  
wrote:

Doesn't look like a good init :(.

 Check for the logs from a process listed (in ps) as `SMS receiver` - 
this is the process handling the modems. Try starting with DBG log 
level, so you can see what the opensips is trying to do with the 
modem.


 Regards,
Bogdan-Andrei Iancu

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

OpenSIPS Summit, Amsterdam, May 2020
  <https://www.opensips.org/events/Summit-2020Amsterdam/>
OpenSIPS Bootcamp, Miami, March 2020
  <https://opensips.org/training/OpenSIPS_Bootcamp_2020/>

On 1/4/20 5:02 PM, volga...@networklab.ca 
<mailto:volga...@networklab.ca> wrote:

Hello Bogdan,
On startup we get

Jan  4 12:01:06 sms /usr/sbin/opensips[20542]: INFO:sms:put_command 
: Modem is not clear to send
Jan  4 12:01:06 sms /usr/sbin/opensips[20542]: INFO:sms:initmodem 
: INFO:initmodem : Checking if 
Modem is registered to the network
Jan  4 12:01:07 sms /usr/sbin/opensips[20542]: INFO:sms:put_command 
: Modem is not clear to send
Jan  4 12:01:07 sms /usr/sbin/opensips[20542]: 
WARNING:sms:initmodem: Modems seems to try to reach the network! 
Let's wait a little bit


Is this modem locked ?

volga629

 On Sat, Jan 4, 2020 at 16:54, Bogdan-Andrei Iancu 
 <mailto:bog...@opensips.org> wrote:

Hi Volga,

 Wooowusing this ancient modulemodem support - it is like 
dark ages :P..


 First of all, at OpenSIPS startup, is the modem successfully 
initialized ?



 Best Regards,
Bogdan-Andrei Iancu

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

OpenSIPS Summit, Amsterdam, May 2020
  <https://www.opensips.org/events/Summit-2020Amsterdam/>
OpenSIPS Bootcamp, Miami, March 2020
  <https://opensips.org/training/OpenSIPS_Bootcamp_2020/>

On 1/3/20 10:20 PM, volga629 via Users wrote:

Hello Everyone,
I need help  identify issue with gsm modem connection in opensips. 
I tried send with external application and no problem everything 
works, but with opensips  get messages


Jan  3 15:09:38 sms /usr/sbin/opensips[16430]: 
NOTICE:core:do_workers_auto_scaling: score 15/15 -> r

Re: [OpenSIPS-Users] gsm modem SMS module

2020-01-04 Thread volga629 via Users

Hello Bogdan,
On startup we get

Jan  4 12:01:06 sms /usr/sbin/opensips[20542]: INFO:sms:put_command: 
Modem is not clear to send
Jan  4 12:01:06 sms /usr/sbin/opensips[20542]: INFO:sms:initmodem: 
INFO:initmodem: Checking if Modem is registered to the network
Jan  4 12:01:07 sms /usr/sbin/opensips[20542]: INFO:sms:put_command: 
Modem is not clear to send
Jan  4 12:01:07 sms /usr/sbin/opensips[20542]: WARNING:sms:initmodem: 
Modems seems to try to reach the network! Let's wait a little bit


Is this modem locked ?

volga629

On Sat, Jan 4, 2020 at 16:54, Bogdan-Andrei Iancu  
wrote:

Hi Volga,

 Wooowusing this ancient modulemodem support - it is like 
dark ages :P..


 First of all, at OpenSIPS startup, is the modem successfully 
initialized ?



 Best Regards,
Bogdan-Andrei Iancu

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

OpenSIPS Summit, Amsterdam, May 2020
  <https://www.opensips.org/events/Summit-2020Amsterdam/>
OpenSIPS Bootcamp, Miami, March 2020
  <https://opensips.org/training/OpenSIPS_Bootcamp_2020/>

On 1/3/20 10:20 PM, volga629 via Users wrote:

Hello Everyone,
I need help  identify issue with gsm modem connection in opensips. I 
tried send with external application and no problem everything 
works, but with opensips  get messages


Jan  3 15:09:38 sms /usr/sbin/opensips[16430]: 
NOTICE:core:do_workers_auto_scaling: score 15/15 -> ripping proc 23 
from group 1 (with 16 procs), estimated load -> 0
Jan  3 15:09:38 sms /usr/sbin/opensips[16462]: 
NOTICE:core:udp_process_graceful_terminate: process 23 received RPC 
to terminate from Main
Jan  3 15:09:38 sms /usr/sbin/opensips[16462]: 
INFO:core:dynamic_process_final_exit 
: doing self termination
Jan  3 15:09:39 sms /usr/sbin/opensips[16430]: 
NOTICE:core:handle_sigs: process 23/16462 did selfexit with status 0
Jan  3 15:09:40 sms /usr/sbin/opensips[16430]: 
NOTICE:core:do_workers_auto_scaling: score 15/15 -> ripping proc 22 
fr om group 1 (with 15 procs), estimated load -> 0
Jan  3 15:09:40 sms /usr/sbin/opensips[16461]: 
NOTICE:core:udp_process_graceful_terminate: process 22 received RPC 
to terminate from Main
Jan  3 15:09:40 sms /usr/sbin/opensips[16461]: 
INFO:core:dynamic_process_final_exit 
: doing self termination
Jan  3 15:09:40 sms /usr/sbin/opensips[16440]: INFO:sms:put_command 
: Modem is not clear to send
Jan  3 15:09:40 sms /usr/sbin/opensips[16440]: NOTICE:sms:initmodem: 
NOTICE:initmodem: Waiting 2 sec. before retrying
Jan  3 15:18:55 sms /usr/sbin/opensips[17250]: INFO:sms:put_command 
: Modem is not clear to send
Jan  3 15:18:55 sms /usr/sbin/opensips[17250]: INFO:sms:initmodem 
: INFO:initmodem : Checking if 
Modem is registered to the network
Jan  3 15:18:56 sms /usr/sbin/opensips[17250]: INFO:sms:put_command 
: Modem is not clear to send



**Messages log when modem is plugged* *
*
*
*Jan  3 14:36:06 sms kernel: option1 ttyUSB0: GSM modem (1-port) 
converter now disconnected from ttyUSB0*

*Jan  3 14:36:06 sms kernel: option 1-2:1.0: device disconnected*
*Jan  3 14:36:06 sms kernel: option1 ttyUSB1: GSM modem (1-port) 
converter now disconnected from ttyUSB1*

*Jan  3 14:36:06 sms kernel: option 1-2:1.1: device disconnected*
*Jan  3 14:36:06 sms kernel: option1 ttyUSB2: GSM modem (1-port) 
converter now disconnected from ttyUSB2*

*
*
*
*
*Configuration *
*
*
*[root@sms tmp]# lsusb*
*Bus 001 Device 013: ID 19d2:0031 ZTE WCDMA Technologies MSM 
MF110/MF627/MF636*

*
*
*
*
* SMS*
*loadmodule "sms.so"*
*modparam("sms", "modems", "ZTE[d=/dev/ttyUSB1;p=my sim 
pin;m=NEW;b=9600]")*

*modparam("sms", "links", "ZTE[D1]")*
*modparam("sms", "networks", "D1[m=10]")*
*modparam("sms", "max_sms_parts", 12)*
*modparam("sms", "sms_report_type", 2)*
*
*
*
*
* what is not clear in configuration is what need to be set if modem 
in Paraguay *

*1.1.2. Numbering Plan*
**
___
Users mailing list
Users@lists.opensips.org <mailto: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] proto smpp inbound

2020-01-03 Thread volga629 via Users

Hello Everyone,
I am trying inbound proto smpp bind as transmitter and connection 
failing.

Opensips as ESME (External Short Messaging Entity).

Jan  3 23:48:05 sms /usr/sbin/opensips[13242]: 
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 527
Jan  3 23:48:05 sms /usr/sbin/opensips[13242]: 
INFO:proto_smpp:smpp_conn_init: smpp_conn_init called
Jan  3 23:48:05 sms /usr/sbin/opensips[13140]: 
ERROR:proto_smpp:handle_bind_transmitter_cmd: NULL params
Jan  3 23:48:10 sms /usr/sbin/opensips[13242]: 
INFO:proto_smpp:smpp_conn_clean: smpp_conn_clean called


It loading both connections as client, but not as server

Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:proto_smpp:load_smpp_sessions_from_db: Loaded 2 SMSc servers
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:proto_smpp:send_bind: binding session with system_id "smppclient"
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 6
Jan  4 00:23:20 sms /usr/sbin/opensips[15628]: 
INFO:proto_smpp:smpp_conn_init: smpp_conn_init called


How to load server connections ?

volga629


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


[OpenSIPS-Users] gsm modem SMS module

2020-01-03 Thread volga629 via Users

Hello Everyone,
I need help  identify issue with gsm modem connection in opensips. I 
tried send with external application and no problem everything works, 
but with opensips  get messages


Jan  3 15:09:38 sms /usr/sbin/opensips[16430]: 
NOTICE:core:do_workers_auto_scaling: score 15/15 -> ripping proc 23 
from group 1 (with 16 procs), estimated load -> 0
Jan  3 15:09:38 sms /usr/sbin/opensips[16462]: 
NOTICE:core:udp_process_graceful_terminate: process 23 received RPC to 
terminate from Main
Jan  3 15:09:38 sms /usr/sbin/opensips[16462]: 
INFO:core:dynamic_process_final_exit: doing self termination
Jan  3 15:09:39 sms /usr/sbin/opensips[16430]: NOTICE:core:handle_sigs: 
process 23/16462 did selfexit with status 0
Jan  3 15:09:40 sms /usr/sbin/opensips[16430]: 
NOTICE:core:do_workers_auto_scaling: score 15/15 -> ripping proc 22 
from group 1 (with 15 procs), estimated load -> 0
Jan  3 15:09:40 sms /usr/sbin/opensips[16461]: 
NOTICE:core:udp_process_graceful_terminate: process 22 received RPC to 
terminate from Main
Jan  3 15:09:40 sms /usr/sbin/opensips[16461]: 
INFO:core:dynamic_process_final_exit: doing self termination
Jan  3 15:09:40 sms /usr/sbin/opensips[16440]: INFO:sms:put_command: 
Modem is not clear to send
Jan  3 15:09:40 sms /usr/sbin/opensips[16440]: NOTICE:sms:initmodem: 
NOTICE:initmodem: Waiting 2 sec. before retrying
Jan  3 15:18:55 sms /usr/sbin/opensips[17250]: INFO:sms:put_command: 
Modem is not clear to send
Jan  3 15:18:55 sms /usr/sbin/opensips[17250]: INFO:sms:initmodem: 
INFO:initmodem: Checking if Modem is registered to the network
Jan  3 15:18:56 sms /usr/sbin/opensips[17250]: INFO:sms:put_command: 
Modem is not clear to send




*Messages log when modem is plugged*

Jan  3 14:36:06 sms kernel: option1 ttyUSB0: GSM modem (1-port) 
converter now disconnected from ttyUSB0

Jan  3 14:36:06 sms kernel: option 1-2:1.0: device disconnected
Jan  3 14:36:06 sms kernel: option1 ttyUSB1: GSM modem (1-port) 
converter now disconnected from ttyUSB1

Jan  3 14:36:06 sms kernel: option 1-2:1.1: device disconnected
Jan  3 14:36:06 sms kernel: option1 ttyUSB2: GSM modem (1-port) 
converter now disconnected from ttyUSB2



Configuration

[root@sms tmp]# lsusb
Bus 001 Device 013: ID 19d2:0031 ZTE WCDMA Technologies MSM 
MF110/MF627/MF636



 SMS
loadmodule "sms.so"
modparam("sms", "modems", "ZTE[d=/dev/ttyUSB1;p=my sim 
pin;m=NEW;b=9600]")

modparam("sms", "links", "ZTE[D1]")
modparam("sms", "networks", "D1[m=10]")
modparam("sms", "max_sms_parts", 12)
modparam("sms", "sms_report_type", 2)


what is not clear in configuration is what need to be set if modem in 
Paraguay

1.1.2. Numbering Plan

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


[OpenSIPS-Users] opensips lua

2019-12-13 Thread volga629 via Users

Hello Everyone,
Having some issue get lua to set proper avp.  When it set in insert 
some extra characters into value of avp

Here are log


Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: test::w 
nah.uy/u5bmnc
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: siplua: Tested 
string ~>0
Dec 14 05:53:41 dev1-fr /usr/sbin/opensips[12985]: SMS_ROUTE_IN: Test 
string ~> [0#012]


It insert #012

Lua script

   local cmd_var = handle:read("*all")
   handle:close()
   xlog("Tested string ~> " .. cmd_var .. "\n")
   return AVP_set("test-str", cmd_var)

Any help thank you

volga629

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


[OpenSIPS-Users] opensips lua

2019-12-06 Thread volga629 via Users

Hello Everyone,
I am trying some conversion lua script with parameters and opensips 
return unexpected  data

Based on module doc param should be as string.

If I set

if(lua_exec("arg_function", "encode:UTF16:$rb")) {


then return

Dec  6 21:29:37 dev1-fr /usr/sbin/opensips[3473]: SMS encode UTF16 with 
body Efcjjfrd
Dec  6 21:29:37 dev1-fr /usr/sbin/opensips[3473]: siplua: got opensips 
string : userdata: 0x7f9226d30080


Lua code

function arg_function(str)
   print("got opensips string : ".. tostring(str))


Also second question how to set avp from lua script ?

AVP_set(msg, name, value)


volga629

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


Re: [OpenSIPS-Users] SHAKEN/STIR

2019-12-03 Thread volga629 via Users
Thank you reply, so any bad actor can't use as example with self sign 
certificates ?   So digital signature must be produced from well known 
authorized CA certificate key pair ?


Can you point on one of the well know CA authority which authorized for 
SHAKEN/STIR.


volga629



On Tue, Dec 3, 2019 at 06:56, Liviu Chircu  wrote:

On 03.12.2019 03:59, volga629 via Users wrote:
If call from originator is being replaced by middle with same source 
and destination and change Identity  header with keys and 
certificate location is possible that terminator will authorize it ?

Hi Volga,

Yes, it is perfectly possible to rebuild the Identity header and 
re-attribute the
 asserted source/destination to yourself.  In order to do this, you 
only need to own
 an officially recognized STIR/SHAKEN X509 cert along with its 
private key, issued by

 a STIR/SHAKEN certification authority.

So, while this is possible, I don't see why anyone in their right 
mind would do it.
 Doing so would jeopardize the image of the carrier, putting their 
business at risk.
 It's similar to how public IP routing in the internet works:  any 
ISP could MITM any

 piece of traffic, yet none do.  Or do they? :)

Best regards,

--
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com <http://www.opensips-solutions.com/>


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


[OpenSIPS-Users] SHAKEN/STIR

2019-12-02 Thread volga629 via Users

Hello Everyone,
I am reading about SHAKEN/STIR and the question is this protocols can 
prevent man in middle ?
If call from originator is being replaced by middle with same source 
and destination and change Identity  header with keys and certificate 
location is possible that terminator will authorize it ?

STIR is using digital signature with calling party info is this enough ?



volga629

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


Re: [OpenSIPS-Users] OpenSIPS @ SIPNOC 2019

2019-11-26 Thread volga629 via Users

Good Luck, very important mission.
You might willing bring to the table some improvement for the effort to 
provide better availability for CA list and  peer verification process.
If  SIPNOC willing to organize web service where all involved parties 
will be able to  register and go through  verify process  as trusted  
telco or voip provider.
And then expose API  from telcos or voip providers end points only ( 
must have fixed end point ip) to get verification information for CA 
list or peer information.
That will have minimal impact on on application layer and will provide 
true trusted source of verification process.


1.3.3. ca_list (string)

  Path to a file containing trusted CA certificates for the
  verifier. The certificates must be in PEM format, one after
  another.

  Example 1.3. Set ca_list parameter
...
modparam("stir_shaken", "ca_list", "/stir_certs/ca_list.pem")
...


volga629



On Tue, Nov 26, 2019 at 14:31, Bogdan-Andrei Iancu 
 wrote:

Hi All

 On 5th of December, I will talk at 
SIPNOC 
2019 [1] about the new STIR/SHAKENimplementation [2] in OpenSIPS 3.1, 
about the usage models and the associated risks.



[1] 
 [2] 




 10:45am – 11:15am: The Usage Models and Risks of STIR/SHAKEN, Seen 
from the Pragmatism of an Implementation.


Abstracts:
 There are many things still to be defined and settled in STIR/SHAKEN 
from the regulatory perspective. Nevertheless, this presentation 
wants to bring this topic under scrutiny from the point of view of an 
implementation in the OpenSIPS SIP Server. So, what are the possible 
STIR/SHAKEN usage scenarios from the perspective of how the SIP 
traffic is handled and, more important, how the certificates are 
managed. While a SIP server may cover the full horizontal of 
authorization, inspection and verification processes, it is more 
relevant to see what are the possible models when comes to 
certificate managing. And definitely there is a need for coexistence 
between a certificate-agnostic model and a certificate self-managing 
model, in order to answer to future standardization and usage 
challenges. ITSP, Telcos and Carries are to deploy and use 
STIR/SHAKEN  implementations in the real word, so are they fully 
aware of the security and performance risks introduced by such a 
service? Well, the exercise of producing such a STIR/SHAKEN 
implementation is a good way to answer these questions and get 
yourselves ready.



 See you in Washington!
--
Bogdan-Andrei Iancu

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


OpenSIPS Bootcamp Pre-Registration
  


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


[OpenSIPS-Users] lua script

2019-11-22 Thread volga629 via Users

Hello Everyone,
In lua module how is possible call multiply arguments for lua function.

Is this valid ?

if (lua_exec("convert_function",arg1,arg2)) {

}

volga629

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


Re: [OpenSIPS-Users] dbalias

2019-11-15 Thread volga629 via Users

This PgSQL table structure

opensips=# \d dbaliases
  Table "public.dbaliases"
Column | Type  | Collation | Nullable |
   Default

+---+---+--+---
id | integer   |   | not null | 
nextval('dbaliases_id_seq'::regclass)
alias_username | character varying(64) |   | not null | 
''::character varying
alias_domain   | character varying(64) |   | not null | 
''::character varying
username   | character varying(64) |   | not null | 
''::character varying
domain | character varying(64) |   | not null | 
''::character varying

Indexes:
   "dbaliases_pkey" PRIMARY KEY, btree (id)
   "dbaliases_alias_idx" UNIQUE CONSTRAINT, btree (alias_username, 
alias_domain)

   "dbaliases_target_idx" btree (username, domain)



volga629

On Fri, Nov 15, 2019 at 15:52, johan  wrote:
That's odd : the primary key is on index and there are no foreign 
keys.


Can you check if you have the same in your db ?


mysql> describe dbaliases;
 
++--+--+-+-++
 | Field  | Type | Null | Key | Default | Extra   
   |
 
++--+--+-+-++
 | id | int(10) unsigned | NO   | PRI | NULL| 
auto_increment |
 | alias_username | char(64) | NO   | MUL | | 
   |
 | alias_domain   | char(64) | NO   | | | 
   |
 | username   | char(64) | NO   | MUL | | 
   |
 | domain | char(64) | NO   | | | 
   |
 
++--+--+-+-++

 5 rows in set (0.01 sec)

 mysql> SELECTTABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, 
REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME FROM   
INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE   REFERENCED_TABLE_SCHEMA = 
'opensips' AND   REFERENCED_TABLE_NAME = 'dbaliases';

 Empty set (0.01 sec)

 mysql>


On 15.11.19 15:31, volga629 via Users wrote:

Hello Everyone,
I am trying use in multi domain environment dbalias table, but hit 
limitation where impossible  insert more then one user per domain.


opensips=# INSERT INTO dbaliases (alias_username, alias_domain, 
username, domain) VALUES ('4384783197', 'dev-sip.networklab.tld', 
'452392', 'dev-sip.networklab.tld');
ERROR:  duplicate key value violates unique constraint 
"dbaliases_alias_idx"



We use PgSQL  10

Any help thank you
volga629

___
Users mailing list
Users@lists.opensips.org <mailto: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] dbalias

2019-11-15 Thread volga629 via Users

Hello Everyone,
I am trying use in multi domain environment dbalias table, but hit 
limitation where impossible  insert more then one user per domain.


opensips=# INSERT INTO dbaliases (alias_username, alias_domain, 
username, domain) VALUES ('4384783197', 'dev-sip.networklab.tld', 
'452392', 'dev-sip.networklab.tld');
ERROR:  duplicate key value violates unique constraint 
"dbaliases_alias_idx"



We use PgSQL  10

Any help thank you
volga629

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


Re: [OpenSIPS-Users] replace From

2019-11-13 Thread volga629 via Users

Thank you for reply,
You referring to ticket 
<https://github.com/OpenSIPS/opensips/issues/1778>


volga629

On Wed, Nov 13, 2019 at 10:47, Răzvan Crainea  
wrote:
Johan is right, there's currently no way the SMPP module sees the 
changes in the script.
But you can open a feature request for this, to add additional fields 
to the send_smpp_msg() command, to specify the from and to fields.


Best regards,
Răzvan

On 11/13/19 9:57 AM, Johan De Clercq wrote:
You need to resubmit the message to opensips. It,s only then that 
you will see the modification of the from header. Same applies for 
to.


Outlook voor iOS <<https://aka.ms/o0ukef>> downloaden

*Van:* Users <mailto:users-boun...@lists.opensips.org>> namens volga629 via 
Users mailto:users@lists.opensips.org>>

*Verzonden:* woensdag, november 13, 2019 3:19 AM
*Aan:* Users
*Onderwerp:* [OpenSIPS-Users] replace From
Hello Everyone,
Which way will be correct to replace From with alias.

Code

 # Check valid DID is present
 alias_db_find("dbaliases", $fu, $avp(from_alias), "r");
 xlog("Found DID ~> $avp(from_alias)\r");
 if($avp(from_alias)) {
 uac_replace_from( , $avp(from_alias));
 } else {
 sl_send_reply(404, "Assigned did is required\n\r");
 exit;
 }

I see in log

Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: Found DID ~> 
sip:4384783...@dev-sip.networklab.tld
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:uac:w_replace_from: dsp=(nil) (len=0) , uri=0x7ffde612a6c0 
(len=37)
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:uac:replace_uri: uri to replace 
[sip:452...@dev-sip.networklab.tld], replacement is 
[sip:4384783...@dev-sip.networklab.tld], enclosed=0
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:uac:replace_uri: encode 
is= len=52
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:rr:add_rr_param: adding 
(;vsf=AAAGCgcOCHNVXEFtFwwGAx0MBFkBFx8bDhBFGA0GLnRsZA--)


But original  from still in place

Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: sending submit_sm
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_del iver_request: *FROM: 452390*
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: TO:  destination 
number
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: MESSAGE: Hello type 
= 65537


Any help thank you.

volga629

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



--
Răzvan Crainea
OpenSIPS Core Developer
  http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>


___
Users mailing list
Users@lists.opensips.org <mailto: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] replace From

2019-11-12 Thread volga629 via Users

Hello Everyone,
Which way will be correct to replace From with alias.

Code

   # Check valid DID is present
   alias_db_find("dbaliases", $fu, $avp(from_alias), "r");
   xlog("Found DID ~> $avp(from_alias)\r");
   if($avp(from_alias)) {
   uac_replace_from( , $avp(from_alias));
   } else {
   sl_send_reply(404, "Assigned did is required\n\r");
   exit;
   }

I see in log

Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: Found DID ~> 
sip:4384783...@dev-sip.networklab.tld
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:uac:w_replace_from: dsp=(nil) (len=0) , uri=0x7ffde612a6c0 (len=37)
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: DBG:uac:replace_uri: 
uri to replace [sip:452...@dev-sip.networklab.tld], replacement is 
[sip:4384783...@dev-sip.networklab.tld], enclosed=0
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: DBG:uac:replace_uri: 
encode is= len=52
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: DBG:rr:add_rr_param: 
adding (;vsf=AAAGCgcOCHNVXEFtFwwGAx0MBFkBFx8bDhBFGA0GLnRsZA--)


But original  from still in place

Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: sending submit_sm
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: *FROM: 452390*
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: TO:  destination number
Nov 13 01:13:18 dev1-fr /usr/sbin/opensips[5217]: 
DBG:proto_smpp:send_submit_or_deliver_request: MESSAGE: Hello type = 
65537


Any help thank you.

volga629

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


Re: [OpenSIPS-Users] switch statment

2019-11-12 Thread volga629 via Users

Thank you fixed.
volga629


On Mon, Nov 11, 2019 at 10:00, Răzvan Crainea  
wrote:

Hi, Volga!

Switch statements don't work with regular expressions, only with 
string and int comparison. If you need to do regex matching, you need 
to use multiple ifs.


Best regards,
Răzvan

On 11/11/19 3:34 AM, volga629 via Users wrote:

Hello Everyone,
Using latest version 3.0.1 can't match switch statement based on $rU.

Here are example

<https://paste.fedoraproject.org/paste/bFBAnYJYly-5PRSmNPKVtg>



Debug output

Nov 11 02:16:45 dev1-fr /usr/sbin/opensips[30243]: [MESSAGE] Sending 
to outside provider ~> [3845637810]
Nov 11 02:16:45 dev1-fr /usr/sbin/opensips[30243]: SMS_ROUTE: Got   
3845637810 looking for correct sms gateway
Nov 11 02:16:45 dev1-fr /usr/sbin/opensips[30243]: 
DBG:core:do_action: switch: running default statement
Nov 11 02:16:45 dev1-fr /usr/sbin/opensips[30243]: Unknown 
destination number



Any help thank  you volga629


**
**

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



--
Răzvan Crainea
OpenSIPS Core Developer
  http://www.opensips-solutions.com 
<http://www.opensips-solutions.com/>


___
Users mailing list
Users@lists.opensips.org <mailto: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] switch statment

2019-11-10 Thread volga629 via Users

Hello Everyone,
Using latest version 3.0.1 can't match switch statement based on $rU.

Here are example





Debug output

Nov 11 02:16:45 dev1-fr /usr/sbin/opensips[30243]: [MESSAGE] Sending to 
outside provider ~> [3845637810]
Nov 11 02:16:45 dev1-fr /usr/sbin/opensips[30243]: SMS_ROUTE: Got  
3845637810 looking for correct sms gateway
Nov 11 02:16:45 dev1-fr /usr/sbin/opensips[30243]: DBG:core:do_action: 
switch: running default statement
Nov 11 02:16:45 dev1-fr /usr/sbin/opensips[30243]: Unknown destination 
number



Any help thank  you volga629




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