[SR-Users] testing the value of $si

2012-04-27 Thread x-kamailio
How do I compare $si to a particular IP address value? This doesn't
seem to work:

if( $si == "123.123.123.123")

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Problem with parallel forking of aliases

2012-05-09 Thread x-kamailio
Greetings,

I'm having trouble getting parallel forking to work with aliasdb. I'm
running kamailio 3.2 with the standard kamailio.cfg script.

I have found that if an alias points to a set of addresses that all
reference local devices that are registered with the server, kamailio
sends an invitation to the first device in the set (the one that the
aliasdb lookup function sets to the ruri, but does *not* invite any of
the other devices in the set, which aliasdb adds as branches.

However, if one of the other aliases points to a non-local address,
such as a PSTN address, kamailio does correctly invite the non-local
address in parallel with the first alias address, which is a local
device.

It seems as if kamailio is ignoring invitations that it is in effect
sending to itself via the additional parallel branches. I would expect
that to call a branch in parallel, kamailio would need to do a lookup
on the branch address and rewrite it to send the invitation to the
registered device. But none of that seems to be happening.

There must be some additional configuration change required to make
this work. Any suggestions?

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] NAT fixups not applied for voicemail

2012-05-09 Thread x-kamailio
Greetings,

Here's another problem I'm having with kamailio 3.2 and the standard
kamailio.cfg script.

If the calling device is NATed, everything works fine if the original
call gets connected. That is, the INVITE sent to the called device has
the correct NAT fixups applied.

But if the called device fails to answer and the script runs
route[TOVOICEMAIL], the call connects, but the INVITE sent to the
voicemail server doesn't have the NAT fixup applied. The result is
that the audio is connected in only one direction.

It would appear that some rtpproxy function needs to get called to
apply the fixups prior to sending the INVITE to the voicemail server.
I've tried adding calls to route(NATMANAGE) at various places, but to
no avail.

Any ideas?

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] how to forward on busy

2011-02-21 Thread x-kamailio
I'm trying to do something very basic, which is to forward a call to a
different number on busy.  But, the various things I've tried from the
examples don't work.

Starting with the kamailio.cfg that is included with version 3.1, what
code would I add to forward all busy calls to "sip:f...@bar.com", a
target that is not necessarily local to the server?

Many thanks!

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] how to forward on busy

2011-02-23 Thread x-kamailio
Is there an example somewhere that shows how to do forward-on-busy,
starting with the kamailio.cfg from version 3.1? Ultimately, I want to
use a per-user AVP to obtain the forwarding URI, but just an example
that shows how to forward to a fixed URI from the failure route would
be great.

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] how to combine alias_db_lookup() with lookup()

2011-02-26 Thread x-kamailio
I'm trying to use the db_alias module as a way to define "generic"
addresses that map to a set of actual phones. For example, I'd like
the alias "h...@foo.bar" to map to "kitc...@foo.bar" and
"off...@foo.bar", so that both phones ring when a call comes in to
"home".

I have set the append_branches param to 1:

   modparam("alias_db", "append_branches", 1)

I also modified the dbaliases database table so that key "alias_idx"
isn't unique, thereby allow me to add multiple rows for the same
alias.

The relevant script section is taken verbatim from 3.1 kamailio.cfg:

   # USER location service
   route[LOCATION] { 

   #!ifdef WITH_ALIASDB
  # search in DB-based aliases
  alias_db_lookup("dbaliases");   

   #!endif

  if (!lookup("location")) {
 switch ($rc) {
case -1:
case -3:
   xlog( "L_WARN", "XXX $ru $fu\n");
   t_newtran();  
   t_reply("404", "Not Found");
   exit;
case -2:   
   sl_send_reply("405", "Method Not Allowed");  
   exit;
 }
  }

  # when routing via usrloc, log the missed calls also
  if (is_method("INVITE"))
  {  
 setflag(FLT_ACCMISSED);
  }
   }

When I place a call to an alias, the kamailio debug log shows that
alias_db_lookup() is correctly setting the ruri to the first entry
found in the table, and using append_branch() to add the others. But
only the first matching phone gets an INVITE, not the others. I
suspect that the lookup() call is blowing away the branches set up by
alias_db_lookup() and replacing them with the single phone that
matches the ruri for the first alias entry.

Is there a way to get alias_db_lookup() and lookup() to play together,
so that the first function can set up a list of branches, and the
second function can resolve all of the branches to the actual device
locations?

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] how to route to new URI on failure

2011-02-26 Thread x-kamailio
I'm trying to route failed calls to a voicemail URI. The failure route
couldn't be simpler:

failure_route[FAIL_ONE] {

   if (t_is_canceled()) {
  exit;
   }

   if( t_check_status("486|408") {
  append_branch( "sip:foo@2.2.2.2");
  t_relay();
   }
}


But, it doesn't work. For example, let's say the initial INVITE
resolves to a local device "me@1.1.1.1". This works fine, and the
phone rings. After a timeout, the failure_route executes. The branch
"foo@2.2.2.2" gets appended, and kamailio sends a new INVITE, but
instead of determining the correct proxy for the new address, it sends
the INVITE, with the new URI, to the device that original received the
INVITE, "me@1.1.1.1". Obviously, this doesn't work.

I've been able to force kamailio to route the call correctly by
modifying failure_route[ to use t_relay_to_udp() as follows:

failure_route[FAIL_ONE] {

   if (t_is_canceled()) {
  exit;
   }

   if( t_check_status("486|408") {
  append_branch( "sip:foo@2.2.2.2");
  t_relay_to_udp( "2.2.2.2", "5060");
   }
}

But, it seems like kamailio should figure what where to send the new
INVITE itself. What am I doing wrong?

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] how to route to new URI on failure

2011-02-27 Thread x-kamailio
On Sun, 27 Feb 2011 13:29:10 -0500, Alex Balashov wrote:

> Try this:
> 
> $ru = ... new URI ...
> append_branch();
> t_relay();

Thanks for the suggestion, but it didn't work!

The new INVITE goes out with the new URI, but kamailio sends the
INVITE to the IP address of the device that failed to answer the
original call.

I'm stumped!

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Consulting needed

2011-02-28 Thread x-kamailio
I need similar assistance. Drop me an email, too!

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users