[SR-Users] Kamailio and Asterisk Realtime Integration using Asterisk Database

Daniel-Constantin Mierla miconda at gmail.com
Thu Feb 17 16:28:27 CET 2011


Hello,

On 2/15/11 3:10 PM, Pavel Miskov wrote:
> Hi all,
>
> I am trying to integrate Kamailio and Asterisk as explained in
> http://kb.asipto.com/asterisk:realtime:kamailio-3.0.x-asterisk-1.6.2-astdb
> document but I have some problems.
>
> 1. When Asterisk sends the call back to Kamailio, Asterisk generates
> new INVITE but with wrong From URI. In From header, "Display name" is
> OK (Phone A) but "From URI" is wrong (it is URI of Phone B).
this was reported to me privately, however it is nothing kamailio can 
do. Maybe asterisk is matching something by IP instead of username there.

Try to force the caller id from asterisk dialplan. Play a bit with 
asterisk configs for peers/users/friends.

Ultimately you can just send the caller id back to kamailio via some 
custom header and use uac_replace_from() to set the proper call id. 
Right now I don't have anymore the environment I used for testing, but I 
don't remember such issue.

> 2. When Phone B answers the call, Asterisk generates another INVITE to
> Phone B. When Phone B sends OK to this second INVITE Asterisk
> generates another INVITE to Phone A.
>
> 3. When Phone B sends BYE, Asterisk generates INVITE to Phone A and
> when it receives OK from Phone A it sends BYE to Phone A.

This is probably some re-invites so asterisk gets out of media relaying. 
IIRC, there is related to canreinvite or such config option in asterisk 
sip channel.

Cheers,
Daniel

> I can fix the first problem with transformation in Kamailio but is
> this the way how it is supposed to work or I misconfigured something?
>
> I have tried this with kamailio 3.1 and asterisk 1.6.2.16.1 (and 1.8.2.3).
>
>
-- 

Daniel-Constantin Mierla
http://www.asipto.com




More information about the sr-users mailing list