Hi,
I'm trying to forward the original username of the peer via Kamailio dispatcher
to the Asterisk and I can't get it working.
The scenario looks like this:
Client Phone (username 1) -> Asterisk Client ---trunk(test-trunk)--> Kamailio
Dispatcher/RTPEngine --trunk--> Asterisk Final
Client is dialing via Asterisk Client with a simple extension:
exten => _X.,1,Set(CALLERID(all)= 587555611 <587555611>)
exten => _X.,n,Dial(SIP/${EXTEN}@test-trunk)
Asterisk Client is registering to the Kamailio with its own credentials and
Kamailio is registering in the Asterisk Final
The problem is that I can't find a way to extract the original trunk username
(like test-trunk) in the outgoing connection to the Asterisk Final (via
Kamailio):
Since i'm using the CALLERID on the Asterisk Client all I can see on the
Asterisk Final is:
INVITE sip:[email protected] SIP/2.0
Record-Route: <sip:[email protected];lr;ftag=as52b874a1;nat=yes>
Via: SIP/2.0/UDP
192.168.20.74;branch=z9hG4bKc6e3.a77db1f002191ae3ee1a414b63d34a72.0
Via: SIP/2.0/UDP
192.168.21.228:5060;received=192.168.21.228;branch=z9hG4bK705ec94a;rport=5060
Max-Forwards: 69
From: "587555611" <sip:[email protected]>;tag=as52b874a1
To: <sip:[email protected]>
Contact: <sip:[email protected]:5060;alias=192.168.21.228~5060~1>
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 16.29.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
P-Asserted-Identity: "587555611" <sip:[email protected]>
Content-Type: application/sdp
Content-Length: 268
There is no way I can forward the 'test-trunk' in the SIP header. I tried to
add append_hf to ROUTE[relay] like append_hf("X-Trunk $au r\n");
but if the trunk is already registered then $au is null or the CALLERID value.
How to extract the original username (test-trunk) on the Asterisk Final? Do you
have any ideas?
Thank you in advance ;)
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!
Edit mailing list options or unsubscribe: