[OpenSIPS-Users] Setting Extensions via Rest API or Database writes

2022-01-04 Thread Nauman Sulaiman (SESSIONTALK)
Hi, 

Just wondering if Opensips has something similar to Asterisk where one can 
setup 
extensions, queues etc via realtime database? Alternatively could it be done 
via RestAPI.
If so, is all functionality configurable from remote or just some?

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


[OpenSIPS-Users] REGISTER destination issue

2011-12-06 Thread Nauman Sulaiman
Hi

We are using Opensips as proxy, when Opensips sends a REGISTER message it 
resolves the domain of the RURI however if the registrar has a bank of servers 
this could result in the 2nd REGISTER message(with auth details) being sent to 
a different server. Some registrars don't seem to keep auth state across 
servers. The simple solution is to send the 2nd REGISTER to the same address as 
the first. I thought of storing the si variable from the 401 response and just 
send the 2nd register to this ip address. 

But i can't use avps to store nor the Dialog state stuff. Can anyone say what 
is the best way to fix this.

Thanks

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


Re: [OpenSIPS-Users] REGISTER destination issue

2011-12-06 Thread Nauman Sulaiman
Hi,

many thanks, we'll give that a try



--- On Tue, 6/12/11, Vlad Paiu vladp...@opensips.org wrote:

 From: Vlad Paiu vladp...@opensips.org
 Subject: Re: [OpenSIPS-Users] REGISTER destination issue
 To: users@lists.opensips.org
 Date: Tuesday, 6 December, 2011, 15:29
 Hi,
 
 Just a suggestion, you could use caching.
 
 When you receive a 401 response, you could save in
 localcache, for the 
 key register_$tu the value $si, with a short expiry.
 When you receive a new Register request, check whether you
 have 
 register_$tu in cache. If you do, then route the Register
 to that value, 
 the old $si.
 
 Regards,
 
 Vlad Paiu
 OpenSIPS Developer
 
 
 On 12/06/2011 04:33 PM, Nauman Sulaiman wrote:
  Hi
 
  We are using Opensips as proxy, when Opensips sends a
 REGISTER message it resolves the domain of the RURI however
 if the registrar has a bank of servers this could result in
 the 2nd REGISTER message(with auth details) being sent to a
 different server. Some registrars don't seem to keep auth
 state across servers. The simple solution is to send the 2nd
 REGISTER to the same address as the first. I thought of
 storing the si variable from the 401 response and just send
 the 2nd register to this ip address.
 
  But i can't use avps to store nor the Dialog state
 stuff. Can anyone say what is the best way to fix this.
 
  Thanks
 
  ___
  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] REGISTER destination issue

2011-12-06 Thread Nauman Sulaiman
Unfortunately when we get the 401 the $si value gives the source address of the 
REGISTER request not the of the 401 response.

How dow we get the ip address of the 401 response?

--- On Tue, 6/12/11, Nauman Sulaiman nauman762-h...@yahoo.co.uk wrote:

 From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
 Subject: Re: [OpenSIPS-Users] REGISTER destination issue
 To: OpenSIPS users mailling list users@lists.opensips.org
 Date: Tuesday, 6 December, 2011, 15:55
 Hi,
 
 many thanks, we'll give that a try
 
 
 
 --- On Tue, 6/12/11, Vlad Paiu vladp...@opensips.org
 wrote:
 
  From: Vlad Paiu vladp...@opensips.org
  Subject: Re: [OpenSIPS-Users] REGISTER destination
 issue
  To: users@lists.opensips.org
  Date: Tuesday, 6 December, 2011, 15:29
  Hi,
  
  Just a suggestion, you could use caching.
  
  When you receive a 401 response, you could save in
  localcache, for the 
  key register_$tu the value $si, with a short expiry.
  When you receive a new Register request, check whether
 you
  have 
  register_$tu in cache. If you do, then route the
 Register
  to that value, 
  the old $si.
  
  Regards,
  
  Vlad Paiu
  OpenSIPS Developer
  
  
  On 12/06/2011 04:33 PM, Nauman Sulaiman wrote:
   Hi
  
   We are using Opensips as proxy, when Opensips
 sends a
  REGISTER message it resolves the domain of the RURI
 however
  if the registrar has a bank of servers this could
 result in
  the 2nd REGISTER message(with auth details) being sent
 to a
  different server. Some registrars don't seem to keep
 auth
  state across servers. The simple solution is to send
 the 2nd
  REGISTER to the same address as the first. I thought
 of
  storing the si variable from the 401 response and just
 send
  the 2nd register to this ip address.
  
   But i can't use avps to store nor the Dialog
 state
  stuff. Can anyone say what is the best way to fix
 this.
  
   Thanks
  
   ___
   Users mailing list
   Users@lists.opensips.org
   http://lists.opensips.org/cgi-bin/mailman/listinfo/users
  
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
  
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 

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


Re: [OpenSIPS-Users] 1.7 uac_registrant issue

2011-12-05 Thread Nauman Sulaiman
Hi

The link below details an issue Chris Martineau reported back in July this 
year. Ovidiu Sas replied and asked a bug be reported. Checked the bug tracker 
but can't find it. Does anyone know if this issue was fixed or if not raised as 
a bug is there a workaround to solve the problem.

http://www.mail-archive.com/users@lists.opensips.org/msg16929.html

Thanks


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


[OpenSIPS-Users] Where in script can one catch 200OK to NOTIFY

2011-10-19 Thread Nauman Sulaiman
Hi, using Opensips 1.6.3

Where in the script can I catch the 200OK response to a NOTIFY sent in response 
to in dialog REFER (call transfer) .  The UA receiving the NOTIFY is sending a 
200OK with a private IP in the contact header. I wish to call fix nated contact 
on this header.

Thanks

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


Re: [OpenSIPS-Users] Rewriting destination uri

2011-10-18 Thread Nauman Sulaiman
Hi, I have found writing and reading these dlg vars work fine with the good 
proxies but the buggy ones (which have the Opensips IP as the RURI) that I need 
to use this method with I can't read the dlg values so it appears the dialog is 
not being matched or something

--- On Mon, 17/10/11, Nauman Sulaiman nauman762-h...@yahoo.co.uk wrote:

 From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
 Subject: Re: [OpenSIPS-Users] Rewriting destination uri
 To: OpenSIPS users mailling list users@lists.opensips.org
 Date: Monday, 17 October, 2011, 12:12
 Hi, 
 
 I have tried using dialog vals to store the contact ip in
 on_reply_route
 the create dialog call succeeds, so is there anything else
 you need to set up to use dialog vals, do you need to use
 the Database??
 
  if (status=~(180)|(183)|2[0-9][0-9])  
         {
            
          
    store_dlg_value(contact_ip,$si);
          
    store_dlg_value(contact_port,$sp);
            }
         
         }
 
 but then i can't access them in the sequential route for
 the ACK
 after loose_route return true
 
 route[2]
 {
   ...
            
 fetch_dlg_value(contact_ip,$var(ip));
              
 fetch_dlg_value(contact_port,$var(port));
          
    xlog(New ACK destination=  $var(ip)
 \n);
               xlog(New
 port=  $var(port) \n);
 
 
 }
 --- On Fri, 14/10/11, Nauman Sulaiman nauman762-h...@yahoo.co.uk
 wrote:
 
  From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
  Subject: Re: [OpenSIPS-Users] Rewriting destination
 uri
  To: OpenSIPS users mailling list users@lists.opensips.org
  Date: Friday, 14 October, 2011, 20:57
  Hi,
  
  Thanks, yes its a buggy proxy. We won't have the
  scenario  
  
  UAC  ProxyA  OpenSIPS  ProxyB
  
  so how best to rewrite the $du in this case
  
  Regards
  
  --- On Fri, 14/10/11, Vlad Paiu vladp...@opensips.org
  wrote:
  
   From: Vlad Paiu vladp...@opensips.org
   Subject: Re: [OpenSIPS-Users] Rewriting
 destination
  uri
   To: users@lists.opensips.org
   Date: Friday, 14 October, 2011, 10:19
   Hello,
   
   First of all, why does the 200 OK have in R-URI
 the
   OpenSIPS IP ?
   It should have as R-URI the Contact URI in the
 200 OK
  ? Are
   you dealing 
   with a buggy client/proxy behind OpenSIPS or is
 there
  some
   other kind of 
   miss-configuration ?
   The solution that you are trying to achieve is
 not
  generic,
   because it 
   would not work
   in case of
   
   UAC  ProxyA  OpenSIPS  ProxyB
   
   Regards,
   
   Vlad Paiu
   OpenSIPS Developer
   
   
   On 10/14/2011 01:02 AM, Nauman Sulaiman wrote:
Hi,
   
We have the following set up , inbound call
 to
  UAC via
   Opensips
   
UAC- Opensips--
 Proxy
  1
          INVITE   
              INVITE
   
              
        
      -
          200OK   
                  
   200OK
                  
              
   --
                  
              ACK RURI=
   Opensips IP
   
   
We would like to set the $du variable after
  Opensips
   receives the
final ACK to be IP:port of the UAC.
   
   
When Opensips receives the 200OK from the
 UAC is
  it
   possible to store the received ip and port
 somewhere
  so we
   can rewrite the $du when we receive the ACK.How
 to do
  this?
   Then how to rewrite the $du
   
Currently the ACK is not routed back to the
 UAC
  as the
   RURI of the ACK has Opensips address.
   
Regards
   
   
   
 ___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   
   ___
   Users mailing list
   Users@lists.opensips.org
   http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   
  
  ___
  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] Rewriting destination uri

2011-10-17 Thread Nauman Sulaiman
Hi, 

I have tried using dialog vals to store the contact ip in on_reply_route
the create dialog call succeeds, so is there anything else you need to set up 
to use dialog vals, do you need to use the Database??

 if (status=~(180)|(183)|2[0-9][0-9])  
{
   
 store_dlg_value(contact_ip,$si);
 store_dlg_value(contact_port,$sp);
   }

}

but then i can't access them in the sequential route for the ACK
after loose_route return true

route[2]
{
  ...
fetch_dlg_value(contact_ip,$var(ip));
  fetch_dlg_value(contact_port,$var(port));
 xlog(New ACK destination=  $var(ip) \n);
  xlog(New port=  $var(port) \n);


}
--- On Fri, 14/10/11, Nauman Sulaiman nauman762-h...@yahoo.co.uk wrote:

 From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
 Subject: Re: [OpenSIPS-Users] Rewriting destination uri
 To: OpenSIPS users mailling list users@lists.opensips.org
 Date: Friday, 14 October, 2011, 20:57
 Hi,
 
 Thanks, yes its a buggy proxy. We won't have the
 scenario  
 
 UAC  ProxyA  OpenSIPS  ProxyB
 
 so how best to rewrite the $du in this case
 
 Regards
 
 --- On Fri, 14/10/11, Vlad Paiu vladp...@opensips.org
 wrote:
 
  From: Vlad Paiu vladp...@opensips.org
  Subject: Re: [OpenSIPS-Users] Rewriting destination
 uri
  To: users@lists.opensips.org
  Date: Friday, 14 October, 2011, 10:19
  Hello,
  
  First of all, why does the 200 OK have in R-URI the
  OpenSIPS IP ?
  It should have as R-URI the Contact URI in the 200 OK
 ? Are
  you dealing 
  with a buggy client/proxy behind OpenSIPS or is there
 some
  other kind of 
  miss-configuration ?
  The solution that you are trying to achieve is not
 generic,
  because it 
  would not work
  in case of
  
  UAC  ProxyA  OpenSIPS  ProxyB
  
  Regards,
  
  Vlad Paiu
  OpenSIPS Developer
  
  
  On 10/14/2011 01:02 AM, Nauman Sulaiman wrote:
   Hi,
  
   We have the following set up , inbound call to
 UAC via
  Opensips
  
   UAC- Opensips-- Proxy
 1
         INVITE   
             INVITE
  
             
       
     -
         200OK   
                 
  200OK
                 
             
  --
                 
             ACK RURI=
  Opensips IP
  
  
   We would like to set the $du variable after
 Opensips
  receives the
   final ACK to be IP:port of the UAC.
  
  
   When Opensips receives the 200OK from the UAC is
 it
  possible to store the received ip and port somewhere
 so we
  can rewrite the $du when we receive the ACK.How to do
 this?
  Then how to rewrite the $du
  
   Currently the ACK is not routed back to the UAC
 as the
  RURI of the ACK has Opensips address.
  
   Regards
  
  
   ___
   Users mailing list
   Users@lists.opensips.org
   http://lists.opensips.org/cgi-bin/mailman/listinfo/users
  
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
  
 
 ___
 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] Rewriting destination uri

2011-10-14 Thread Nauman Sulaiman
Hi,

Thanks, yes its a buggy proxy. We won't have the scenario  

UAC  ProxyA  OpenSIPS  ProxyB

so how best to rewrite the $du in this case

Regards

--- On Fri, 14/10/11, Vlad Paiu vladp...@opensips.org wrote:

 From: Vlad Paiu vladp...@opensips.org
 Subject: Re: [OpenSIPS-Users] Rewriting destination uri
 To: users@lists.opensips.org
 Date: Friday, 14 October, 2011, 10:19
 Hello,
 
 First of all, why does the 200 OK have in R-URI the
 OpenSIPS IP ?
 It should have as R-URI the Contact URI in the 200 OK ? Are
 you dealing 
 with a buggy client/proxy behind OpenSIPS or is there some
 other kind of 
 miss-configuration ?
 The solution that you are trying to achieve is not generic,
 because it 
 would not work
 in case of
 
 UAC  ProxyA  OpenSIPS  ProxyB
 
 Regards,
 
 Vlad Paiu
 OpenSIPS Developer
 
 
 On 10/14/2011 01:02 AM, Nauman Sulaiman wrote:
  Hi,
 
  We have the following set up , inbound call to UAC via
 Opensips
 
  UAC- Opensips-- Proxy 1
        INVITE   
            INVITE
 
            
      
    -
        200OK   
                
 200OK
                
            
 --
                
            ACK RURI=
 Opensips IP
 
 
  We would like to set the $du variable after Opensips
 receives the
  final ACK to be IP:port of the UAC.
 
 
  When Opensips receives the 200OK from the UAC is it
 possible to store the received ip and port somewhere so we
 can rewrite the $du when we receive the ACK.How to do this?
 Then how to rewrite the $du
 
  Currently the ACK is not routed back to the UAC as the
 RURI of the ACK has Opensips address.
 
  Regards
 
 
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 

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


[OpenSIPS-Users] Not writing to Opensips log

2011-10-13 Thread Nauman Sulaiman
Hi, I deleted the 1.6 opensips log i had redirected logging to 
/var/log/opensips.log as it had become huge. However opensips is not logging to 
it anymore. I've done a chmod 777 on the new log file but that still does not 
help. 

Can anyone tell me how to get it logging again without having to reboot the 
whole server.

Thanks

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


[OpenSIPS-Users] Rewriting destination uri

2011-10-13 Thread Nauman Sulaiman
Hi, 

We have the following set up , inbound call to UAC via Opensips

UAC- Opensips -- Proxy 1
 INVITE   INVITE

  -
 200OK200OK
  --
 ACK RURI= Opensips IP


We would like to set the $du variable after Opensips receives the 
final ACK to be IP:port of the UAC.


When Opensips receives the 200OK from the UAC is it possible to store the 
received ip and port somewhere so we can rewrite the $du when we receive the 
ACK.How to do this? Then how to rewrite the $du

Currently the ACK is not routed back to the UAC as the RURI of the ACK has 
Opensips address.

Regards


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


Re: [OpenSIPS-Users] Any limit on registrants in uac module

2011-10-10 Thread Nauman Sulaiman
Hi, thanks just a couple of quick questions

1) Can module parameters to uac_registrant be loaded from avp (database)
rather than hard code in cfg

2) Can uac_registrant module parameters be dynamically changed?

Regards

--- On Sat, 8/10/11, Ovidiu Sas o...@voipembedded.com wrote:

 From: Ovidiu Sas o...@voipembedded.com
 Subject: Re: [OpenSIPS-Users] Any limit on registrants in uac module
 To: nauman762-h...@yahoo.co.uk, OpenSIPS users mailling list 
 users@lists.opensips.org
 Date: Saturday, 8 October, 2011, 22:53
 Try to increase the size of the hash
 table to better distribute the load:
 http://www.opensips.org/html/docs/modules/devel/uac_registrant.html#id249100
 If you encounter any issues, let me know.
 
 Regards,
 Ovidiu Sas
 
 On Sat, Oct 8, 2011 at 2:40 PM, Nauman Sulaiman
 nauman762-h...@yahoo.co.uk
 wrote:
  Hi,
 
  With Opensips 1.7 Is there any limit on the number of
 registrants you can have with uac_registrant module. Could
 it handle 1000?
 
  Thanks
 
  ___
  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] Any limit on registrants in uac module

2011-10-08 Thread Nauman Sulaiman
Hi,

With Opensips 1.7 Is there any limit on the number of registrants you can have 
with uac_registrant module. Could it handle 1000?

Thanks

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


[OpenSIPS-Users] Opensips crashing due to out of memory error

2011-04-09 Thread Nauman Sulaiman
Hi, I'm getting random crashes of Opensips 1.6.2, here are the entries in the 
log, seems to be out of memory, how should i try to solve this issue.

ERROR:tm:_reply_light: failed to allocate shmem buffer
ERROR:tm:_reply_light: failed to allocate shmem buffer
ERROR:tm:relay_reply: no more share memory
ERROR:core:new_avp: no more shm mem
ERROR:core:add_avp: Failed to create new avp structure
 

Regards

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


[OpenSIPS-Users] Lookup contact from user part of RURI

2011-02-02 Thread Nauman Sulaiman
Hi, using opensips 1.6.2. I am trying to use the user part of incoming RURI 
to look up a contact, reason being is full RURI is incorrect, this is due to 
bogus proxy upstream so need a workaround.

lookup(location) seems to be only if you use AOR.

For exmaple i need to reroute incoming ACK to real address of UA
So i would like to lookup 1234 user part of RURI below and rewrite the
RURI with the correct ip. 12.34.56.78 is Opensips IP rather than end UA ip.

1...@domain.com is stored in db. How do i lookup contact just with user part 
and rewrite the RURI.

ie ACK sip:1234@12.34.56.78;rinstance=A89B5393

Need something for below
 if(method==ACK)
 {
  xlog(ACK received  \n);
  if( $rd == 12.34.56.78)  // check if opensips ip
  {
   lookup(user);  // ???   // need to lookup with user or rinstance
   // rewrite RURI with correct address
 }
 }




Hope its clear, thanks


  

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


[OpenSIPS-Users] Fw: Re: Opensips outbound proxy problem

2011-01-25 Thread Nauman Sulaiman
Hi, Does anyone have any suggestions for this?

Many thanks 

--- On Tue, 18/1/11, Nauman Sulaiman nauman762-h...@yahoo.co.uk wrote:

 From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
 Subject: Re: [OpenSIPS-Users] Opensips outbound proxy problem
 To: Bogdan-Andrei Iancu bog...@opensips.org
 Date: Tuesday, 18 January, 2011, 21:03
 Hi, yes Registar receives correct
 contact but then changes it to the ip address it came from.
 For example Voxalot do this, its incorrect behaviour. We
 just want to know best way to workaround it.
 
 Regards
 
 --- On Tue, 18/1/11, Bogdan-Andrei Iancu bog...@opensips.org
 wrote:
 
  From: Bogdan-Andrei Iancu bog...@opensips.org
  Subject: Re: [OpenSIPS-Users] Opensips outbound proxy
 problem
  To: nauman762-h...@yahoo.co.uk,
 OpenSIPS users mailling list users@lists.opensips.org
  Date: Tuesday, 18 January, 2011, 11:53
  Hi Nauman,
  
  First you need to see who's changing the Contact hdr
 (from
  UA IP to opensips IP) - does the REGISTER received by
  REGISTRAR server carry the right Contact?
  
  Regards,
  Bogdan
  
  Nauman Sulaiman wrote:
   Hi, we are using opensips as outbound proxy. We
 have a
  problem when a UA
   registers with certain servers via opensips but
 the
  contact address returned by the registrar is that of
  opensips rather than the UA. Both the UA and opensips
 are on
  public ip and we have opensips inserting path header.
 Just
  some registrars behave incorrectly.
   
   UA - Opensips 
 REGISTRAR
   
   Are there any standard tricks/techniques we can
 use in
  opensips to route any INVITES/ACK/BYE back to the UA
 as the
  RURI are set to the opensips proxy address rather than
 the
  UA. 
   Thanks
   
   
         
   ___
   Users mailing list
   Users@lists.opensips.org
   http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   
     
  
  
  -- Bogdan-Andrei Iancu
  OpenSIPS Event - expo, conf, social, bootcamp
  2 - 4 February 2011, ITExpo, Miami,  USA
  OpenSIPS solutions and know-how
  
  
 
 
 
 


  

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


[OpenSIPS-Users] Opensips outbound proxy problem

2011-01-18 Thread Nauman Sulaiman
Hi, we are using opensips as outbound proxy. We have a problem when a UA
registers with certain servers via opensips but the contact address returned by 
the registrar is that of opensips rather than the UA. Both the UA and opensips 
are on public ip and we have opensips inserting path header. Just some 
registrars behave incorrectly.

UA - Opensips  REGISTRAR

Are there any standard tricks/techniques we can use in opensips to route any 
INVITES/ACK/BYE back to the UA as the RURI are set to the opensips proxy 
address rather than the UA. 

Thanks


  

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


[OpenSIPS-Users] Opensips altering RTP port in SDP??

2010-12-06 Thread Nauman Sulaiman
Hi, using Opensips 1.6.2. I have observed that soemtimes Opensips changes the  
RTP port in the SDP description. This is when using Bria Counterpath client 
with another softphone. It seems to be because the Bria client has an RTP port 
of 4000 which gets remapped to something higher eg 4100. This then results in 
one way audio. Are there any reasons that Opensips would alter the  SDP m=audio 
line. We are using a Netgear router but don't believe this is modifying 
anything.

Thanks


  

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


Re: [OpenSIPS-Users] Fw: Using same DNS resolved ip

2010-10-04 Thread Nauman Sulaiman
Hi, 

Unfortunately adding Path header did not work :(

Regards


  

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


Re: [OpenSIPS-Users] Fw: Using same DNS resolved ip

2010-10-02 Thread Nauman Sulaiman
Just to clarify, i have the following setup

UA  Opensips --- Callcentric Voip Provider(for example)


I wish to have the UA register with Callcentric via Opensips as outbound proxy 
so that all future invites come via it. I have not being able to get any UA ( 
Bria etc) to register with CallCentric which leads me to think there is a 
problem with my script. Registering with providers who do not do load balancing 
is straight forward. It's just with providers such as Callcentric, what happens 
is as i am just using Opensips as a relay for registration the 407  from 
Callcentric is passed back to the UA which sends another REGISTER request, this 
is then sent to a different IP (different callcentric proxy) by Opensips, 
presumably because it does a fresh look up.

here is my script which deals with register requests:

 if (!uri==myself)
{
   
route(1);
}



In route[1] 

 if (method==REGISTER)
 {
  if (!t_relay()) {
sl_reply_error();
}
 exit;  

 }

This works with most providers but not those doing load balancing.

Thanks

--- On Fri, 1/10/10, Nauman Sulaiman nauman762-h...@yahoo.co.uk wrote:

 From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
 Subject: [OpenSIPS-Users] Fw:  Using same DNS resolved ip
 To: users@lists.opensips.org
 Date: Friday, 1 October, 2010, 17:17
 Hi Anca
 
 I've tried 2 different User Agent behind Opensips issuing
 the REGISTER, Opensips is just proxying the request. The
 problem is each time it sends to a different IP.So
 Callcentric returns 407 with stale = true
 
 Regards
 
 --- On Thu, 30/9/10, Nauman Sulaiman nauman762-h...@yahoo.co.uk
 wrote:
 
  From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
  Subject: [OpenSIPS-Users] Using same DNS resolved ip
  To: users@lists.opensips.org
  Date: Thursday, 30 September, 2010, 22:34
  Hi, using Opensips 1.6.2. We were
  wondering if it was possible to force Opensips to use
 the
  same IP address when issuing REGISTER request to
 certain
  VoIP providers such as CallCentric which do load
 balancing
  on their servers. Currently we are using Opensips as
  outboundproxy each time it issues a REGISTER request
 it does
  a round robin of all DNS address got from an SRV
 lookup.
  Because i think there is a bug in CallCentric and
 others
  that if it receives a REGISTER with auth info at a
 different
  ip that issued the challenge it sends another 407
 challenge.
  Is there anyway to force Opensips to use the same ip?
  
  Thanks
  
  
        
  
  ___
  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] Downstream proxy rewriting contact header

2010-10-01 Thread Nauman Sulaiman
Hi, using Opensips 1.6.2 we have the following setup.

UA1Opensips Proxy --- P1 -- P2 -- UA2

Proxy P1 is rewriting contact header sent by opensips in 180 and 200K response  
to INVITE from UA2 to UA1. All proxies are record-routing. P1 seems to assume 
all requests are from behind NAT and rewrites the contact header with source IP 
ie that of Opensips proxy. The result is UA2 ACK is routed only to Opensips 
proxy and does not reach UA1. Is there any i can handle this in the Opensips 
proxy to account for behaviour of P1. 

Thanks


  

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


[OpenSIPS-Users] Fw: Using same DNS resolved ip

2010-10-01 Thread Nauman Sulaiman
Hi Anca

I've tried 2 different User Agent behind Opensips issuing the REGISTER, 
Opensips is just proxying the request. The problem is each time it sends to a 
different IP.So Callcentric returns 407 with stale = true

Regards

--- On Thu, 30/9/10, Nauman Sulaiman nauman762-h...@yahoo.co.uk wrote:

 From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
 Subject: [OpenSIPS-Users] Using same DNS resolved ip
 To: users@lists.opensips.org
 Date: Thursday, 30 September, 2010, 22:34
 Hi, using Opensips 1.6.2. We were
 wondering if it was possible to force Opensips to use the
 same IP address when issuing REGISTER request to certain
 VoIP providers such as CallCentric which do load balancing
 on their servers. Currently we are using Opensips as
 outboundproxy each time it issues a REGISTER request it does
 a round robin of all DNS address got from an SRV lookup.
 Because i think there is a bug in CallCentric and others
 that if it receives a REGISTER with auth info at a different
 ip that issued the challenge it sends another 407 challenge.
 Is there anyway to force Opensips to use the same ip?
 
 Thanks
 
 
       
 
 ___
 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] Using same DNS resolved ip

2010-09-30 Thread Nauman Sulaiman
Hi, using Opensips 1.6.2. We were wondering if it was possible to force 
Opensips to use the same IP address when issuing REGISTER request to certain 
VoIP providers such as CallCentric which do load balancing on their servers. 
Currently we are using Opensips as outboundproxy each time it issues a REGISTER 
request it does a round robin of all DNS address got from an SRV lookup. 
Because i think there is a bug in CallCentric and others that if it receives a 
REGISTER with auth info at a different ip that issued the challenge it sends 
another 407 challenge. Is there anyway to force Opensips to use the same ip?

Thanks


  

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


[OpenSIPS-Users] Problem with Opensips routing Reinvite ACK

2010-09-29 Thread Nauman Sulaiman
Hi, we have a set up as follows using Opensips 1.6.2

UA  -   OpenSIPS  - SIP Provider

TLSTLS   UDP
   UDP

We can set up a call from Sip Provider to UA. However when we issue a Reinvite 
due to (Hold) from UA the Sip provider gets the invite and sends 200K to which 
the UA responds with an ACK , however Opensips does not seem
to be routing this ACK back to the provider. Strangely the Reinvite which 
initally started this has the same route set, yet that reaches the provider.

ACK sip:anonym...@217.10.79.23:5060 SIP/2.0
   Via: SIP/2.0/TLS 192.168.0.4;branch=z9hG4bKyQatKQmaHK0Br
 Route:
sip:178.230.138.190:5061;transport=tls;r2=on;lr=on;ftag=as7615d7df
   Route: sip:178.230.138.190;r2=on;lr=on;ftag=as7615d7df
   Route: sip:217.10.79.23;lr=on;ftag=as7615d7df
   Route: sip:172.20.40.3;lr=on
   Route: sip:217.10.79.23;lr=on;ftag=as7615d7df
   Max-Forwards: 70
   From: sip:00441619082...@sipgate.co.uk;tag=t8B2BFQDUgNvc
   To: anonymous sip:anonym...@sipgate.co.uk;tag=as7615d7df
   Call-ID: 27a6f665224ffd7b7c5e0d2616be4...@sipgate.co.uk
   CSeq: 2556588 ACK
   Content-Length: 0






  

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


Re: [OpenSIPS-Users] Opensips ACK routing problem

2010-08-24 Thread Nauman Sulaiman
Maybe one way round this problem would be for us to replace the incoming RURI 
on the ACK with a sips address maybe to force Opensips to forward it on the tls 
connection

Not sure how to do this however or is there better way?

--- On Mon, 23/8/10, Nauman Sulaiman nauman762-h...@yahoo.co.uk wrote:

 From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
 Subject: [OpenSIPS-Users] Opensips ACK routing problem
 To: users@lists.opensips.org
 Date: Monday, 23 August, 2010, 14:42
 Hi, using Opensips 1.6.2. We are
 using Opensips as outbound proxy using TLS just for final
 hop between UAC and Opensips. Other legs of the call will be
 udp. We have a test set up with Sipgate (but same occurs
 with other providers) where an incoming INVITE to the UAC
 via opensips results in 200ok  generated by UAC and
 then the ACK coming back from sipgate server is routed over
 udp connection as opposed to tls, opensips seems to be
 ignoring the Route header in the ACK
 
 If the contact header has a sips uri opensips will route it
 correctly but some voip providers do not like sips uri in
 contact header and we are only using tls for the final hop
 so are not using a sips uri for contact header.
 
 Do we have our understanding of the spec wrong or should
 opensips be routing according to the route header or should
 it use the contact header. 
 
 Opensips ip 172.230.135.190   UAC ip
 81.13.94.206
 
 U 217.10.79.23:5060 - 172.230.135.190:5060
 ACK sip:9082...@81.13.94.206:59053 SIP/2.0.
 Via: SIP/2.0/UDP
 217.10.79.23:5060;branch=z9hG4bK59c7.0bbb2877.2.
 Via: SIP/2.0/UDP
 172.20.40.4;branch=z9hG4bK59c7.0bbb2877.2.
 Via: SIP/2.0/UDP
 217.10.79.23:5060;received=217.10.68.226;branch=z9hG4bK6a423428.
 Via: SIP/2.0/UDP
 217.10.66.71:5060;branch=z9hG4bK6a423428;rport=5060.
 Route:
 sip:172.230.135.190;r2=on;lr=on;ftag=as126bf37e,sip:172.230.135.190:5061;transport=tls;r2=on;lr=on;ftag=as126bf37e.
 From: anonymous sip:anonym...@sipgate.co.uk;tag=as126bf37e.
 To: sip:00441519082...@sipgate.co.uk;tag=94gc3N42r9X5D.
 Contact: sip:anonym...@217.10.66.71.
 Call-ID: 181c48541a5ad00d04322ccc0752c...@sipgate.co.uk.
 CSeq: 102 ACK.
 Max-Forwards: 67.
 Content-Length: 0.
 X-hint: rr-enforced.
 .
 
 
 U 172.230.135.190:5060 - 81.13.94.206:59053
 ACK sip:9082...@81.13.94.206:59053 SIP/2.0.
 Via: SIP/2.0/UDP
 172.230.135.190;branch=z9hG4bK59c7.6f77cf2.3.
 Via: SIP/2.0/UDP
 217.10.79.23:5060;rport=5060;received=217.10.79.23;branch=z9hG4bK59c7.0bbb2877.2.
 Via: SIP/2.0/UDP
 172.20.40.4;branch=z9hG4bK59c7.0bbb2877.2.
 Via: SIP/2.0/UDP
 217.10.79.23:5060;received=217.10.68.226;branch=z9hG4bK6a423428.
 Via: SIP/2.0/UDP
 217.10.66.71:5060;branch=z9hG4bK6a423428;rport=5060.
 From: anonymous sip:anonym...@sipgate.co.uk;tag=as126bf37e.
 To: sip:00441519082...@sipgate.co.uk;tag=94gc3N42r9X5D.
 Contact: sip:anonym...@217.10.66.71.
 Call-ID: 181c48541a5ad00d04322ccc0752c...@sipgate.co.uk.
 CSeq: 102 ACK.
 Max-Forwards: 66.
 Content-Length: 0.
 X-hint: rr-enforced.
  
 
 
 
       
 
 ___
 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 ACK routing problem

2010-08-23 Thread Nauman Sulaiman
Hi, using Opensips 1.6.2. We are using Opensips as outbound proxy using TLS 
just for final hop between UAC and Opensips. Other legs of the call will be 
udp. We have a test set up with Sipgate (but same occurs with other providers) 
where an incoming INVITE to the UAC via opensips results in 200ok  generated by 
UAC and then the ACK coming back from sipgate server is routed over udp 
connection as opposed to tls, opensips seems to be ignoring the Route header in 
the ACK

If the contact header has a sips uri opensips will route it correctly but some 
voip providers do not like sips uri in contact header and we are only using tls 
for the final hop so are not using a sips uri for contact header.

Do we have our understanding of the spec wrong or should opensips be routing 
according to the route header or should it use the contact header. 

Opensips ip 172.230.135.190   UAC ip 81.13.94.206

U 217.10.79.23:5060 - 172.230.135.190:5060
ACK sip:9082...@81.13.94.206:59053 SIP/2.0.
Via: SIP/2.0/UDP 217.10.79.23:5060;branch=z9hG4bK59c7.0bbb2877.2.
Via: SIP/2.0/UDP 172.20.40.4;branch=z9hG4bK59c7.0bbb2877.2.
Via: SIP/2.0/UDP 
217.10.79.23:5060;received=217.10.68.226;branch=z9hG4bK6a423428.
Via: SIP/2.0/UDP 217.10.66.71:5060;branch=z9hG4bK6a423428;rport=5060.
Route: 
sip:172.230.135.190;r2=on;lr=on;ftag=as126bf37e,sip:172.230.135.190:5061;transport=tls;r2=on;lr=on;ftag=as126bf37e.
From: anonymous sip:anonym...@sipgate.co.uk;tag=as126bf37e.
To: sip:00441519082...@sipgate.co.uk;tag=94gc3N42r9X5D.
Contact: sip:anonym...@217.10.66.71.
Call-ID: 181c48541a5ad00d04322ccc0752c...@sipgate.co.uk.
CSeq: 102 ACK.
Max-Forwards: 67.
Content-Length: 0.
X-hint: rr-enforced.
.


U 172.230.135.190:5060 - 81.13.94.206:59053
ACK sip:9082...@81.13.94.206:59053 SIP/2.0.
Via: SIP/2.0/UDP 172.230.135.190;branch=z9hG4bK59c7.6f77cf2.3.
Via: SIP/2.0/UDP 
217.10.79.23:5060;rport=5060;received=217.10.79.23;branch=z9hG4bK59c7.0bbb2877.2.
Via: SIP/2.0/UDP 172.20.40.4;branch=z9hG4bK59c7.0bbb2877.2.
Via: SIP/2.0/UDP 
217.10.79.23:5060;received=217.10.68.226;branch=z9hG4bK6a423428.
Via: SIP/2.0/UDP 217.10.66.71:5060;branch=z9hG4bK6a423428;rport=5060.
From: anonymous sip:anonym...@sipgate.co.uk;tag=as126bf37e.
To: sip:00441519082...@sipgate.co.uk;tag=94gc3N42r9X5D.
Contact: sip:anonym...@217.10.66.71.
Call-ID: 181c48541a5ad00d04322ccc0752c...@sipgate.co.uk.
CSeq: 102 ACK.
Max-Forwards: 66.
Content-Length: 0.
X-hint: rr-enforced.
 



  

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


[OpenSIPS-Users] 302 not being handled by failure route

2010-08-21 Thread Nauman Sulaiman
Hi, we have a setup where we are using Opensips to redirect an invite from 3rd 
party client registered at address 172.228.136.190:5060 to our Asterisk server 
at 172.228.136.190:5062

We use the little bit of code below. The problem we have is if our Asterisk 
server sends a 302 redirect(after original INVITE redirection) it is no longer 
being handled by failure route! So it actually ends up being relayed along 
rather than handled locally by uac_redirects.

If we did not use a 3rd party client and Asterisk was the target of the 
original invite (so we did not have the code below as no need to redirect)
then when Asterisk sends a 302 everything works properly ie in failure route we 
call uac_redirects etc

So the question is why is the 302 stuff not being called if the original invite 
was redirected. 



 if (is_method(INVITE)) {
 
xlog(method invite in route 1 \n);
#lookup(location);
if(uri=~sip:@172.228.136.190:5060 )
{
  xlog( Forwarding to Asterisk \n);
   rewritehostport(172.228.136.190:5062);
xlog(rewritten RURI  [$ru] \n);
   t_relay();
   exit;
}


t_on_branch(2);
t_on_reply(2);   
t_on_failure(1);
}


Thanks


  

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


Re: [OpenSIPS-Users] 302 not being handled by failure route

2010-08-21 Thread Nauman Sulaiman
Please ignore this post , the bug is obvious i had the t_relay before the
t_branch_failure in the code  

--- On Sat, 21/8/10, Nauman Sulaiman nauman762-h...@yahoo.co.uk wrote:

 From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
 Subject: [OpenSIPS-Users] 302 not being handled by failure route
 To: users@lists.opensips.org
 Date: Saturday, 21 August, 2010, 14:42
 Hi, we have a setup where we are
 using Opensips to redirect an invite from 3rd party client
 registered at address 172.228.136.190:5060 to our Asterisk
 server at 172.228.136.190:5062
 
 We use the little bit of code below. The problem we have is
 if our Asterisk server sends a 302 redirect(after original
 INVITE redirection) it is no longer being handled by failure
 route! So it actually ends up being relayed along rather
 than handled locally by uac_redirects.
 
 If we did not use a 3rd party client and Asterisk was the
 target of the original invite (so we did not have the code
 below as no need to redirect)
 then when Asterisk sends a 302 everything works properly ie
 in failure route we call uac_redirects etc
 
 So the question is why is the 302 stuff not being called if
 the original invite was redirected. 
 
 
 
  if (is_method(INVITE)) {
          
                
 xlog(method invite in route 1 \n);
                
 #lookup(location);
                
 if(uri=~sip:@172.228.136.190:5060 )
                 {
                
   xlog( Forwarding to Asterisk \n);
                
    rewritehostport(172.228.136.190:5062);
                
     xlog(rewritten RURI  [$ru] \n);
                
    t_relay();
                
    exit;
                 }
         
         
                
 t_on_branch(2);
                
 t_on_reply(2);   
                
 t_on_failure(1);
         }
 
 
 Thanks
 
 
       
 
 ___
 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] Fixed nated contact problem when using TLS

2010-08-07 Thread Nauman Sulaiman
Hi, we have a setup where we are using OpenSIPS as an out/inbound proxy. Te 
connection to the UAC is a TLS (port 5061) one and the connection fron OpenSIPS 
to third party voip provider is UDP (5060).  We have the TLS connection working 
and the UAC can successfully register with the provider. OpenSIPS is record 
routing twice once for the TLS route and another for the UDP. It seems to be 
bridging too. 

The problem we have is when we have an incoming invite (from voip provider) the 
contact header returned in the 200 OK from the UAC to OpensIPS has a private 
address say 192.168.1.20:5061, when opensips bridges this and the fixed nated 
contact is applied the correct external ip is sent 172.175.130.156:51056 but 
the port has changed. So the ACK when sent from provider back to OpenSIPS has 
the above address as req URI and then opensips can't route it back to the UAC 
because of the incorrect port. So main issue is OpenSIPS can't get the ACK back 
to UAC to establish the dialog. 

When there was no bridging (ie no TLS) the port was 5060 and fixed nated 
contact mapped it like this 172.175.130.156:5060 ie didn't change the port

How to get round this?

Thanks


  

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


[OpenSIPS-Users] Fixed nated contact problem when using TLS

2010-08-07 Thread Nauman Sulaiman
it turns out we just need to rewrite the ipadress and not the port. There was 
some discussion on here some time back of a variant of fix_nated_contact_f that 
would allow a rewrite of ipaddress only, did this get implemented? If not is 
there a patch.

Thanks


  

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


[OpenSIPS-Users] OpenSIPS TLS client certificates

2010-08-06 Thread Nauman Sulaiman
Hi, using version 1.6.2. I created the rootCA  and server certificate using the 
opensipsctl tls rootCA and opensipsctl tls userCERT commands but what file am i 
supposed to give to the client, which is custom softphone UA?

Thanks


  

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


Re: [OpenSIPS-Users] Location info when using OpenSIPS as outbound proxy

2010-08-01 Thread Nauman Sulaiman
Hi Bogan

Thanks for the replies, we are basically registering with a third party 
provider and the save location on the Opensips isn't really to keep track of 
registration state, its just to keep track of the location of the UAC 
irrespective of whether its registered or not. 

we now have the following code in route(1) of sample script

if (method==REGISTER)
{   
 xlog(saving AoR non local domain \n);

 if (!save(location,mr))
 {
xlog(couldn't save location in route 1 \n);
sl_reply_error();
 }


if (!t_relay()) {
   sl_reply_error();
}

   exit;
}

we are not challenging the UAC if the domain is not the opensips proxy, we just 
let it go through and save location. We take it if you issue a challenge here 
you need a copy of the credentials of the UAC on the opensips proxy, as we will 
not have this, is the above valid?

--- On Sun, 1/8/10, Bogdan-Andrei Iancu bog...@voice-system.ro wrote:

 From: Bogdan-Andrei Iancu bog...@voice-system.ro
 Subject: Re: [OpenSIPS-Users] Location info when using OpenSIPS as outbound 
 proxy
 To: OpenSIPS users mailling list users@lists.opensips.org
 Date: Sunday, 1 August, 2010, 19:14
 Hi Andrew,
 
 what you are doing is dangerous :)
 
 Even if the contacts+expires values will be properly
 extracted from the 
 reply, other data will be bogus, like:
     - user agent
     - socket info (only if you do change it
 before relaying the register)
     - path info
     - received value + branch flags (if some
 forking is done)
 
 Regards,
 Bogdan
 
 Andrew Pogrebennyk wrote:
  On 01.08.2010 20:37, Bogdan-Andrei Iancu wrote:
    
  2) ideally, for an outbound proxy, you should do
 the registration 
  processing at reply time, once the main registrar
 accepted the 
  registration and eventually made all the changes
 over it. But right 
  now 
  opensips does not accept registration processing
 for replies.
      
 
  Just in case - some time ago I did something like:
 
  onreply_route[3] {
      # Here we handle REGISTER replies
      xlog(L_INFO, [$mi] [$rs
 $rr]\n);
      if (status=~200) {
          route(3);
      };
 
  route[3] {
      # workaround for location saving
      xlog(L_INFO, saving
 location\n);
      save(location,0x02);
  }
 
 
  0x02 - do not generate a SIP reply to the current
 REGISTER request.
 
    
 
 
 -- 
 Bogdan-Andrei Iancu
 OpenSIPS Bootcamp
 20 - 24 September 2010, Frankfurt, Germany
 www.voice-system.ro
 
 
 ___
 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] What does save(location) actually do?

2010-07-31 Thread Nauman Sulaiman
Hi, we are using opensips 1.6.2.  We are using OpenSIPS as an outbound proxy in 
open relay mode for time being. For all register requests to provider beyond 
opensips we wish to save the AoR. So we are calling save(location). 
This for local routing for 302 later.

However the very act of calling save(location) is causing a 401 to go out??
We are not using authentication on the opensips outbound proxy. There is 
nothing in the docs to suggest this.

If we remove the save then the register completes fine, code below
added to route[1] of sample script

called from here

 if (!uri==myself)
  {
  xlog( Route 1 due to non local domain \n);
 route(1);
 }


route[1] {

# for INVITEs enable some additional helper routes
if (is_method(INVITE)) {
xlog(method invite in route 1 \n);
t_on_branch(2);
t_on_reply(2);
t_on_failure(1);
}

if (method==REGISTER)
{
xlog(saving AoR non local domain \n);
save(location);
}

 
if (!t_relay()) {
sl_reply_error();
};
exit;
}
 


  

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


[OpenSIPS-Users] Contact - private IP problem

2010-07-30 Thread Nauman Sulaiman
Hi, we are using OpenSIPS 1.6.2 as an outbound proxy, we have registered with 
Voipfone to test but the same problem occurs with other Voip providers
Once registered we can't receive incoming calls, if we use STUN on the UAC then 
we are ok. However we would prefer to handle the nat traversal on the proxy. We 
have implemented all the code in Flavio's book.

However the contact header sent from the proxy to the Voipfone server has a 
private ip although it has the nat=yes appended. So something is working please 
see REGISTER trace below.

We think we are missing something but unsure what.

UAC-Proxy

REGISTER sip:voipfone.co.uk SIP/2.0.
Via: SIP/2.0/UDP 192.168.0.2;rport;branch=z9hG4bKeyaZHZ6DrXptj.
Max-Forwards: 70.
From: sip:30146...@voipfone.co.uk;tag=44U5mK3gB9ZvH.
To: sip:30146...@voipfone.co.uk.
Call-ID: 102ce92b-166c-122e-a99f-37fea39c3827.
CSeq: 134125887 REGISTER.
Contact: sip:30146...@192.168.0.2:5060.
Expires: 600.
User-Agent: 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, NOTIFY.
Supported: path.
Authorization: Digest username=30146027, realm=asterisk, nonce=hhvuahjm, 
algorithm=MD5, uri=sip:voipfone.co.uk, response=4d8dbfef$
Content-Length: 0.
.

Proxy-Voipfone

REGISTER sip:voipfone.co.uk SIP/2.0.
Via: SIP/2.0/UDP 178.235.138.190;branch=z9hG4bK23c.505fb9b2.0.
Via: SIP/2.0/UDP 
192.168.0.2;received=88.148.7.122;rport=5060;branch=z9hG4bKeyaZHZ6DrXptj.
Max-Forwards: 69.
From: sip:30146...@voipfone.co.uk;tag=44U5mK3gB9ZvH.
To: sip:30146...@voipfone.co.uk.
Call-ID: 102ce92b-166c-122e-a99f-37fea39c3827.
CSeq: 134125887 REGISTER.
Contact: sip:30146...@192.168.0.2:5060;nat=yes.
Expires: 600.
User-Agent: 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, NOTIFY.
Supported: path.
Authorization: Digest username=30146027, realm=asterisk, nonce=hhvuahjm, 
algorithm=MD5, uri=sip:voipfone.co.uk, response=4d8dbfef$
Content-Length: 0.

Voipfone-Proxy

SIP/2.0 200 OK.
Via: SIP/2.0/UDP 
178.235.138.190;branch=z9hG4bK23c.505fb9b2.0;received=178.235.138.190;rport=5060.
Record-Route: sip:195.189.173.10:5060;lr=on.
Via: SIP/2.0/UDP 
192.168.0.2;received=88.148.7.122;rport=5060;branch=z9hG4bKeyaZHZ6DrXptj.
From: sip:30146...@voipfone.co.uk;tag=44U5mK3gB9ZvH.
To: sip:30146...@voipfone.co.uk.
Call-ID: 102ce92b-166c-122e-a99f-37fea39c3827.
CSeq: 134125887 REGISTER.
Contact: sip:30146...@192.168.0.2:5060;nat=yes;expires=60.
Expires: 60.
Date: Fri, 30 Jul 2010 15:16:15 GMT.
Min-Expires: 60.
User-Agent: Voipfone.
Content-Length: 0.

 



  

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


[OpenSIPS-Users] Location info when using OpenSIPS as outbound proxy

2010-07-28 Thread Nauman Sulaiman
Hi, using opensips 1.6.2. We are using Opensips as an outbound proxy which also 
does local routing of 302 responses. IF we have a client UAC1 which registers 
with a provider using OpenSIPS only as an outbound proxy is it possible to save 
the location info of UAC1, reason being if there is a call 
to UAC2 for instance from the provider which is redirected with 302, then our 
Opensips can handle the redirection because it knows where UAC1 is without 
having it to go back to the provider's proxy server.

Maybe we need to do 2 registrations one with OpenSIPS and one with the provider 
but if we can do this with just the one it would be a neat solution. 

Secondly if we do save the location info of UAC1 at the opensips proxy, what 
url would need to go in contact field of the 302, would it be u...@provider.com 
- opensips needs soemthing ot be able to send to UAC1 


  

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


[OpenSIPS-Users] 302 redirect problem

2010-07-26 Thread Nauman Sulaiman
Hi , we have a set up where we are using a SIP proxy( OpenSIPS) to handle a 302 
redirect locally but it doesn't seem to be working with voip providers here is 
the call flow. Is it legal, if so we'll bother you with a SIP trace. The 302 is 
handled locally by the OpenSIPS proxy and generates a new call leg but can't 
establish a dialog with Sipgate or Voipfone

                 INVITE             INVITE
VoipFone Server - Proxy  UAC1
                  Trying
VoipFone  Server   Proxy
                                    180 Ring
                 180 Ring       - UAC1
                --    Proxy    302 Redir
                                -- UAC1
                                    INVITE
                                --- UAC2
                                   180 Ring
                                UAC2
                  180 Ring
VoipFone Server --   
                  CANCEL     
                        200 OK
                 200 OK         --- UAC2
               

THe VoipFone server sends a cancel straight after the 180 ring, Sipgate
doesn't do this however it never sends an ACK for the 200K, anyway both
don't like what we are doing.

We need to do the 302 redirect locally on our proxy as not all Voip providers 
support it so we can't let it go all the way back. Hope its clear what we are 
trying to, and is there any way forward.

Here is the code in our opensips.cfg file 

failure_route[1] {
        if (t_was_cancelled()) {
                exit;
        }

        get_redirects(3:1);
        t_relay();
}

Thanks



  

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


Re: [OpenSIPS-Users] Run custom PHP script to send SMS upon receiving invite

2010-07-24 Thread Nauman Sulaiman
Thank you for the respnses

--- On Sat, 24/7/10, Brett Nemeroff br...@nemeroff.com wrote:

From: Brett Nemeroff br...@nemeroff.com
Subject: Re: [OpenSIPS-Users] Run custom PHP script to send SMS upon receiving 
invite
To: OpenSIPS users mailling list users@lists.opensips.org
Date: Saturday, 24 July, 2010, 15:59

The exec module has a huge performance penalty. I'd avoid it if high 
performance is required. I don't know anything about your application, but if 
the time delay between the invite and the SMS isn't too sensitive, you could 
consider using avp_db_query to insert a queued notification to a SMS message.


Alternatively, you could use avp_db_query with db_http to post a realtime SMS 
notification, but you'd need to create a db adapter per db_http; it shouldn't 
be too hard at all. The perl module is also very good, but I'm not sure how 
up-to-date it is. 


-Brett


On Sat, Jul 24, 2010 at 7:48 AM, Laszlo las...@voipfreak.net wrote:


Sounds like a bad idea :)

You can try to play with the exec module, see 
http://www.opensips.org/html/docs/modules/1.6.x/exec.html



-Laszlo




2010/7/24 Nauman Sulaiman nauman762-h...@yahoo.co.uk




Hi, using OpenSIPs 1.6, how does one run a custom php script (or whatever code) 
uponreceiving incoming INVITE. We need to perform some custom action ie send 
SMS message



when receiving an INVITE. With asterisk one can use the System function in 
DialPlanwhat is the equivalent way with OpensSIPS.
Thanks 




  
___

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





-Inline Attachment Follows-

___
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 as outbound proxy for asterisk client

2010-07-24 Thread Nauman Sulaiman
Hi, We have Asterisk 1.6.2.9 and Opensips 1.6.2 in the same Linux box and we 
want 
to have OpenSIPS as the out/inbound proxy for Asterisk when running as UAC. 

We have Asterisk registered with Sipgate ok when sending REGISTER directly to 
the Sipgate
domain but would like to send the Register via OpenSIPS so it's in the path for 
incoming invites

Opensips.cfg as follows

listen=udp:192.168.0.20:5060

register code: we have removed the authentication for now to get this working 
first

 if (is_method(REGISTER))
    {

   if (!db_check_to())
   {
    sl_send_reply(403,Forbidden auth ID);
    exit;
   }

    if (!save(location))
    sl_reply_error();

    exit;
    }




we have astersik sip.conf file as follows

[general]
port=5062
bindaddr=0.0.0.0
context=default
outboundproxy=192.168.0.20
outboundproxyport=5060

register = username:sec...@sipgate.co.uk/username

[username]
type=friend
context=incoming
username=username
secret=secret
host=sipgate.co.uk
host=dynamic
fromdomain=sipgate.co.uk
insecure=port,invite
nat=yes
disallow=all
allow=alaw
canreinvite=no

However the REGISTER messages are sent by Astersik but ther is no response fron 
OpenSIPS and it is not routing them either . Is it because they are both on the 
same IP?
We do have then on different ports so though it would be ok




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


Re: [OpenSIPS-Users] Opensips as outbound proxy for asterisk client

2010-07-24 Thread Nauman Sulaiman
Hi, many thanks

 we don't follow this line

$du = sip:sipgate_ip_goes_here:port

where do we get the sipgate ip, should this just be

$du = sip:sipgate.co.uk:5060

at least it explains why we saw the REGISTER being gobbled


--- On Sat, 24/7/10, Laszlo las...@voipfreak.net wrote:

From: Laszlo las...@voipfreak.net
Subject: Re: [OpenSIPS-Users] Opensips as outbound proxy for asterisk client
To: nauman762-h...@yahoo.co.uk, OpenSIPS users mailling list 
users@lists.opensips.org
Date: Saturday, 24 July, 2010, 19:28

You can relay the register to sipgate, so when auth is done, then you can 
forward it.

consume_credentials();
$du = sip:sipgate_ip_goes_here:port;
t_relay();
exit;

so instead of doing if (!save(location))   etc




-Laszlo


2010/7/24 Nauman Sulaiman nauman762-h...@yahoo.co.uk


Hi, We have Asterisk 1.6.2.9 and Opensips 1.6.2 in the same Linux box and we 
want 
to have OpenSIPS as the out/inbound proxy for Asterisk when running as UAC. 



We have Asterisk registered with Sipgate ok when sending REGISTER directly to 
the Sipgate
domain but would like to send the Register via OpenSIPS so it's in the path for 
incoming invites

Opensips.cfg as follows



listen=udp:192.168.0.20:5060

register code: we have removed the authentication for now to get this working 
first

 if (is_method(REGISTER))


    {

   if (!db_check_to())
   {
   
 sl_send_reply(403,Forbidden auth ID);
    exit;
   }

    if (!save(location))
    sl_reply_error();

    exit;


    }




we have astersik sip.conf file as follows

[general]
port=5062
bindaddr=0.0.0.0
context=default
outboundproxy=192.168.0.20
outboundproxyport=5060

register =
 username:sec...@sipgate.co.uk/username

[username]
type=friend
context=incoming
username=username
secret=secret
host=sipgate.co.uk


host=dynamic
fromdomain=sipgate.co.uk
insecure=port,invite
nat=yes
disallow=all
allow=alaw
canreinvite=no

However the REGISTER messages are sent by Astersik but ther is no response fron 
OpenSIPS and it is not routing them either . Is it because they are both on the 
same IP?


We do have then on different ports so though it would be ok






  
___

Users mailing list

Users@lists.opensips.org

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



#yiv373057038 #avg_ls_inline_popup {padding:0px 
0px;margin-left:0px;margin-top:0px;width:240px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:13px;}



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


Re: [OpenSIPS-Users] Opensips as outbound proxy for asterisk client

2010-07-24 Thread Nauman Sulaiman
Hi, making progress

we now have this so the REGISTER is passed to the Sipgate proxy transparently 
it could be any proxy server so 

 if (is_method(REGISTER))
    {
 
 ##$du = sip:sipgate.co.uk:5060;
 t_relay();
  exit();
 }

We can see via Wireshark trace that REGISTER is reaching the sipgate proxy but 
OpenSIPS is returning a 403 to our Asterisk (acting as the SIP client)

its because of this code, so then upon receiving the 403 from Opensips it 
doesn't respond to the 401 from the sipgate proxy. What should we be doing below

if (!is_uri_host_local())
    {
    if(is_from_local()) {
 route(1);
 }
 else {
  sl_send_reply(403,Not here);
   }

    ##append_hf(P-hint: outbound\r\n);
    # if you have some interdomain connections via TLS
    ##if($rd==tls_domain1.net) {
    ##  t_relay(tls:domain1.net);
    ##  exit;
    ##} else if($rd==tls_domain2.net) {
    ##  t_relay(tls:domain2.net);
    ##  exit;
    ##}
    ##route(1);
    }

Thanks

--- On Sat, 24/7/10, Nauman Sulaiman nauman762-h...@yahoo.co.uk wrote:

From: Nauman Sulaiman nauman762-h...@yahoo.co.uk
Subject: Re: [OpenSIPS-Users] Opensips as outbound proxy for asterisk client
To: OpenSIPS users mailling list users@lists.opensips.org, Laszlo 
las...@voipfreak.net
Date: Saturday, 24 July, 2010, 19:48

Hi, many thanks

 we don't follow this line

$du = sip:sipgate_ip_goes_here:port

where do we get the sipgate ip, should this just be

$du = sip:sipgate.co.uk:5060

at least it explains why we saw the REGISTER being gobbled


--- On Sat, 24/7/10, Laszlo las...@voipfreak.net wrote:

From: Laszlo las...@voipfreak.net
Subject: Re: [OpenSIPS-Users] Opensips as outbound proxy for asterisk client
To: nauman762-h...@yahoo.co.uk, OpenSIPS users mailling list 
users@lists.opensips.org
Date: Saturday, 24 July, 2010, 19:28

You can relay the register to sipgate, so when auth is done, then you can 
forward it.

consume_credentials();
$du =
 sip:sipgate_ip_goes_here:port;
t_relay();
exit;

so instead of doing if (!save(location))   etc




-Laszlo


2010/7/24 Nauman Sulaiman nauman762-h...@yahoo.co.uk


Hi, We have Asterisk 1.6.2.9 and Opensips 1.6.2 in the same Linux box and we 
want 
to have OpenSIPS as the out/inbound proxy for Asterisk when running as UAC. 



We have Asterisk registered with Sipgate ok when sending REGISTER directly to 
the Sipgate
domain but would like to send the Register via OpenSIPS so it's in the path for 
incoming invites

Opensips.cfg as follows



listen=udp:192.168.0.20:5060

register code: we have removed the authentication for now to get this working 
first

 if (is_method(REGISTER))


    {

   if (!db_check_to())
   {
   
 sl_send_reply(403,Forbidden auth ID);
    exit;
   }

    if (!save(location))
    sl_reply_error();

    exit;


    }




we have astersik sip.conf file as follows

[general]
port=5062
bindaddr=0.0.0.0
context=default
outboundproxy=192.168.0.20
outboundproxyport=5060

register =
 username:sec...@sipgate.co.uk/username

[username]
type=friend
context=incoming
username=username
secret=secret
host=sipgate.co.uk


host=dynamic
fromdomain=sipgate.co.uk
insecure=port,invite
nat=yes
disallow=all
allow=alaw
canreinvite=no

However the REGISTER messages are sent by Astersik but ther is no response fron 
OpenSIPS and it is not routing them either . Is it because they are both on the 
same IP?


We do have then on different ports so though it would be ok






  
___

Users mailing list

Users@lists.opensips.org

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



#yiv363631247 #yiv373057038 #avg_ls_inline_popup {padding:0px 
0px;margin-left:0px;margin-top:0px;width:240px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:13px;}





  
-Inline Attachment Follows-

___
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 as UAC and Proxy

2010-07-23 Thread Nauman Sulaiman
Hi, we have a design requirement where we have a 'home network' which acts a UA 
(temporary) and will proxy INVITE etc to mobile SIP endpoints. The mobile SIP 
endpointswont be registered and will need to be woken up by the home network 
using non SIP mechanism. They will inform the home network of their location 
once woken and the home network should then proxy the INVITE to them. 
We are considering usng OpenSIPS for this but would like to know if it possible 
for us to do this. In order to receive the initial INVITE the OpenSIPS server 
will need to register on behalf of the mobile UA's and then once they are woken 
and their location known it needs to proxy the SIP messages to them.
Hope its clear, asterisk we don't think works for this as it creates another 
call leg rather than proxying the messages.
Can OpensSIPS do this? 
Thanks 


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


[OpenSIPS-Users] Run custom PHP script to send SMS upon receiving invite

2010-07-23 Thread Nauman Sulaiman
Hi, using OpenSIPs 1.6, how does one run a custom php script (or whatever code) 
uponreceiving incoming INVITE. We need to perform some custom action ie send 
SMS messagewhen receiving an INVITE. With asterisk one can use the System 
function in DialPlanwhat is the equivalent way with OpensSIPS.
Thanks 


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