Hi Daniel,
thanks for this, it looks like exactly what I'm looking for. I've been moved onto
another project for the next week but will try this as soon as I can.
Thanks
Kenny Watson
-----Original Message-----
From: sr-users-bounces(a)lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org]
On Behalf Of Daniel Tryba
Sent: 24 October 2014 12:40
To: sr-users(a)lists.sip-router.org
Subject: Re: [SR-Users] Kamailio Infront of Asterisk with remote PBX
On Thursday 23 October 2014 19:16:58 Kenny Watson wrote:
What I need to figure out is how to on kamailo maybe
using a dial
prefix specify that the call is going to a remote extension on a
"user" and rewrite the to header to be extension@useripaddress rather
than user@useripaddress.
I think your "problem" can be summarized as:
initial trunk invite: INVITE sip:number@kamailio in kamailio $rU is number, but after a
successful location lookup
(lookup("location")/alias_db_lookup) $rU is the username from subscribers or
dbaliases. Without further processing the invite to asterisk would look like:
INVITE sip:username@asterisk
The solution I use is simple:
-before lookup I store the initial $rU in an avp(callednumber).
-lookup
-check in usr_preferences wether the endpoint wants DID or should be addressed with its
username (true/false) -if true: $rU=$avp(callednumber)
-t_relay()
--
POCOS B.V. - Croy 9c - 5653 LC Eindhoven
Telefoon: 040 293 8661 - Fax: 040 293 8658
http://www.pocos.nl/ -
http://www.sipo.nl/
K.v.K. Eindhoven 17097024
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users