[SR-Users] Kamailio Infront of Asterisk with remote PBX

Kenny Watson KWatson at geniusppt.com
Fri Oct 24 16:38:58 CEST 2014


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 at lists.sip-router.org [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel Tryba
Sent: 24 October 2014 12:40
To: sr-users at 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 at useripaddress rather 
> than user at useripaddress.

I think your "problem" can be summarized as:

initial trunk invite: INVITE sip:number at 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 at 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 at lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



More information about the sr-users mailing list