Hi,
I'm using LCR module in Kamailio , where matching of the rule (From-URI in LCR-rule table) is currently based on user part of sip address in From field (highlighted below in blue).
While we need to change the identification to be on the otg value sent in the sip address in From field (highlighted below in yellow).
INVITE sip:86532917453592@172.16.5.108:5060 http://sip:86532917453592@172.16.5.108:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.5.112:5060;branch=z9hG4bK1sansay9906915rdb2243
Via: SIP/2.0/UDP 216.53.4.5:5060;branch=z9hG4bK_1852370774_4741_1
Record-Route: sip:sansay9906915rdb2243@172.16.5.112:5060;lr;transport=udp
To: <sip:86532917453592@69.41.186.186:5060 http://sip:86532917453592@69.41.186.186:5060 >
From: <sip: http://sip:+249964642906@216.53.4.5:5060 +249964642906@216.53.4.5:5060;otg=024050>;tag=1852370774_C
Call-ID: sbcsipuac.2_169.132.137.51_b55sb12_1_1_2015052909455960_1852370774_487698
CSeq: 1 INVITE
Contact: <sip:+249964642906@216.53.4.5:5060 http://sip:+249964642906@216.53.4.5:5060 >
P-Asserted-Identity: <sip:+249964642906@216.53.4.5:5060 http://sip:+249964642906@216.53.4.5:5060 >
Privacy: none
User-Agent: VCS 5.9.2.42-01
Allow: INVITE, ACK, CANCEL, BYE
Max-Forwards: 69
Content-Length: 0
How can we achieve this ?
Any help will be appreciated.
Regards,
Ali
Hello Ali,
Have a look at this function:
http://kamailio.org/docs/modules/4.2.x/modules/uac.html#uac.f.uac_replace_fr...)
Be sure to properly read about how it works and the formal implications of using it, though.
-- Alex
On 06/02/2015 06:40 AM, Ali Taher wrote:
Hi,
I’m using LCR module in Kamailio , where matching of the rule (From-URI in LCR-rule table) is currently based on user part of sip address in From field (highlighted below in blue).
While we need to change the identification to be on the otg value sent in the sip address in From field (highlighted below in yellow).
INVITE sip:86532917453592@172.16.5.108:5060 http://sip:86532917453592@172.16.5.108:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.5.112:5060;branch=z9hG4bK1sansay9906915rdb2243
Via: SIP/2.0/UDP 216.53.4.5:5060;branch=z9hG4bK_1852370774_4741_1
Record-Route: sip:sansay9906915rdb2243@172.16.5.112:5060;lr;transport=udp
To: <sip:86532917453592@69.41.186.186:5060 http://sip:86532917453592@69.41.186.186:5060>
From: <sip:+249964642906@216.53.4.5:5060 http://sip:+249964642906@216.53.4.5:5060;*otg=024050*>;tag=1852370774_C
Call-ID: sbcsipuac.2_169.132.137.51_b55sb12_1_1_2015052909455960_1852370774_487698
CSeq: 1 INVITE
Contact: <sip:+249964642906@216.53.4.5:5060 http://sip:+249964642906@216.53.4.5:5060>
P-Asserted-Identity: <sip:+249964642906@216.53.4.5:5060 http://sip:+249964642906@216.53.4.5:5060>
Privacy: none
User-Agent: VCS 5.9.2.42-01
Allow: INVITE, ACK, CANCEL, BYE
Max-Forwards: 69
Content-Length: 0
How can we achieve this ?
Any help will be appreciated.
Regards,
Ali
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
Ali Taher writes:
I'm using LCR module in Kamailio , where matching of the rule (From-URI in LCR-rule table) is currently based on user part of sip address in From field (highlighted below in blue).
While we need to change the identification to be on the otg value sent in the sip address in From field (highlighted below in yellow).
I'm not sure if I understood the question or if someone already answered it, but you can use whatever URI you like as "from_uri" by including the third argument in load_gws() call:
load_gws(lcr_id[, uri_user[, caller_uri]])
-- Juha