[SR-Users] Integrating Kamailio and Freeswitch

mark li limark67 at yahoo.com
Thu Mar 27 15:35:30 CET 2014


Ok so here's the latest status: 


I still get a busy signal when I try to call from one phone to the other.  But I found one problem that was contributing to the issue. 

In my kamailio.cfg, I was adding a 'kb-' prefix before I route the call to freeswitch.  And on the freeswitch side, I was looking for that prefix in my dialplan and then stripping off the prefix before I tried to send the call back kamailio.  The INVITE that Kamailio was creating had the 'kb-' in the SIP Address.  But I don't have any extensions called kb-888 or kb-999.  They are 888 and 999.  So now, my INVITE requests that Kamailio creates look correct.http://pastebin.com/tuGGpCn7

The call still doesn't complete but i think i'm one step closer. 

what i'm wondering is are there any settings in Kamailio that i need to "accept" sip calls from freeswitch? 

In freeswitch you have to specify specific domains in the acl.conf.xml file... just wondering if kamailio has something similar?

Thanks.



________________________________
 From: mark li <limark67 at yahoo.com>
To: mark li <limark67 at yahoo.com>; "sr-users at lists.sip-router.org" <sr-users at lists.sip-router.org>; Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org> 
Sent: Wednesday, March 26, 2014 2:27:05 PM
Subject: Re: [SR-Users] Integrating Kamailio and Freeswitch
 


Two updates: 


1.  the link i had was incorrect.  this is the correct link to the "how to" that I'm following: 

http://kb.asipto.com/freeswitch:kamailio-3.3.x-freeswitch-1.2.x-sbc
2.  I've narrowed down the issue a little bit.  Here's what I've found, along with some more background information: 


a) i have two polycom phones on my network, ext 888 and 999.
b) they both register fine to the sip proxy. (192.168.1.101)

c)  when i try to call ext 888 from ext 999, via a tcpdump, i can see that the call makes it to the freeswitch server (192.169.1.111) 
Since ext 888 is online, it should have just directed the call to the phone (vs. going to vmail) but instead, I get the following error message:

SIP/2.0 480 Temporarily Unavailable
   Via: SIP/2.0/UDP 192.168.1.101;branch=z9hG4bK9db9.11128f7.0
   Via: SIP/2.0/UDP 192.168.1.102;branch=z9hG4bKe920d3d0328D8D59
   Max-Forwards: 14
   From: "999" <sip:999 at 192.168.1.101>;tag=11B3C4E2-A9A9E183
   To: <sip:888 at 192.168.1.101;user=phone>;tag=vmNpFtt7t5t1D
   Call-ID: ff78246e-9eeda51f-a54bce3c at 192.168.1.102
   CSeq: 1 INVITE
   User-Agent: FreeSWITCH-mod_sofia/1.5.12b+git~20140320T233219Z~dd242f3ba6~32bit
   Accept: application/sdp
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
   Supported: timer, path, replaces
   Allow-Events: talk, hold, conference, refer
   Reason: Q.850;cause=16;text="NORMAL_CLEARING"
   Content-Length: 0
   Remote-Party-ID: "kb-888" <kb-888>;party=calling;privacy=off;screen=no

In debugging on freeswitch I can see that it tries to match a dialplan for kb-888 and then ends up attempting to do a enum look up on "kb-888".  Then it says that it has completed the dialplan. 

I don't have an extension kb-888 registered.  I can see where in the configs that I am prefixing "kb" to the calls on the kamailio side.  And on the freeswitch side of the house, I see where I a regular expression looking for this prefix.  But I don't know how i can get freeswitch to send the call to 888 at 192.168.1.101

Here's some of the debug data from freeswitch: 

2014-03-26 11:04:07.345480 [DEBUG] switch_ivr.c:1830 (sofia/external/999 at 192.168.1.101) State Change CS_EXECUTE -> CS_ROUTING
2014-03-26 11:04:07.345480 [DEBUG] switch_core_session.c:1385 Send signal sofia/external/999 at 192.168.1.101 [BREAK]
2014-03-26 11:04:07.345480 [DEBUG] switch_core_session.c:905 Send signal sofia/external/999 at 192.168.1.101 [BREAK]
2014-03-26 11:04:07.345480 [NOTICE] switch_ivr.c:1837 Transfer sofia/external/999 at 192.168.1.101 to enum[kb-888 at default]
2014-03-26 11:04:07.345480 [DEBUG] switch_core_state_machine.c:530 (sofia/external/999 at 192.168.1.101) State EXECUTE going to
 sleep
2014-03-26 11:04:07.345480 [DEBUG] switch_core_state_machine.c:467 (sofia/external/999 at 192.168.1.101) Running State Change CS_ROUTING
2014-03-26 11:04:07.345480 [DEBUG] switch_core_state_machine.c:523 (sofia/external/999 at 192.168.1.101) State ROUTING
2014-03-26 11:04:07.345480 [DEBUG] mod_sofia.c:123 sofia/external/999 at 192.168.1.101 SOFIA ROUTING
2014-03-26 11:04:07.345480 [DEBUG] switch_core_state_machine.c:164 sofia/external/999 at 192.168.1.101 Standard ROUTING
2014-03-26 11:04:07.345480 [DEBUG] mod_enum.c:642 ENUM Lookup on kb-888
2014-03-26 11:04:07.345480 [DEBUG] mod_enum.c:494 No Nameservers specified, using host default
2014-03-26 11:04:07.405488 [DEBUG] switch_core_state_machine.c:214 (sofia/external/999 at 192.168.1.101) State Change CS_ROUTING -> CS_EXECUTE
2014-03-26 11:04:07.405488 [DEBUG]
 switch_core_session.c:1385 Send signal sofia/external/999 at 192.168.1.101 [BREAK]
2014-03-26 11:04:07.405488 [DEBUG]
 switch_core_state_machine.c:523 (sofia/external/999 at 192.168.1.101) State ROUTING going to sleep
2014-03-26 11:04:07.405488 [DEBUG] switch_core_state_machine.c:467 (sofia/external/999 at 192.168.1.101) Running State Change CS_EXECUTE
2014-03-26 11:04:07.405488 [DEBUG] switch_core_state_machine.c:530 (sofia/external/999 at 192.168.1.101) State EXECUTE
2014-03-26 11:04:07.405488 [DEBUG] mod_sofia.c:178 sofia/external/999 at 192.168.1.101 SOFIA EXECUTE
2014-03-26 11:04:07.405488 [DEBUG] switch_core_state_machine.c:256 sofia/external/999 at 192.168.1.101 Standard EXECUTE
2014-03-26 11:04:07.405488 [NOTICE] switch_core_state_machine.c:313 sofia/external/999 at 192.168.1.101 has executed the last dialplan instruction, hanging up.
2014-03-26 11:04:07.405488 [NOTICE] switch_core_state_machine.c:315 Hangup
 sofia/external/999 at 192.168.1.101 [CS_EXECUTE] [NORMAL_CLEARING]
2014-03-26 11:04:07.405488 [DEBUG]
 switch_channel.c:3215 Send signal sofia/external/999 at 192.168.1.101 [KILL]
2014-03-26 11:04:07.405488 [DEBUG] switch_core_session.c:1385 Send signal sofia/external/999 at 192.168.1.101 [BREAK]
2014-03-26 11:04:07.405488 [DEBUG] switch_core_state_machine.c:530 (sofia/external/999 at 192.168.1.101) State EXECUTE going to sleep
2014-03-26 11:04:07.405488 [DEBUG] switch_core_state_machine.c:467 (sofia/external/999 at 192.168.1.101) Running State Change CS_HANGUP
2014-03-26 11:04:07.405488 [DEBUG] switch_core_state_machine.c:730 (sofia/external/999 at 192.168.1.101) Callstate Change RINGING -> HANGUP
2014-03-26 11:04:07.405488 [DEBUG] switch_core_state_machine.c:732 (sofia/external/999 at 192.168.1.101) State HANGUP
2014-03-26 11:04:07.405488 [DEBUG] mod_sofia.c:413 Channel sofia/external/999 at 192.168.1.101 hanging up, cause: NORMAL_CLEARING
2014-03-26
 11:04:07.405488 [DEBUG] mod_sofia.c:547 Responding to INVITE with: 480
send 777 bytes to
 udp/[192.168.1.101]:5060 at 11:04:07.412221:
   ------------------------------------------------------------------------
   SIP/2.0 480 Temporarily Unavailable
   Via: SIP/2.0/UDP 192.168.1.101;branch=z9hG4bK9db9.11128f7.0
   Via: SIP/2.0/UDP 192.168.1.102;branch=z9hG4bKe920d3d0328D8D59
   Max-Forwards: 14
   From: "999" <sip:999 at 192.168.1.101>;tag=11B3C4E2-A9A9E183
   To: <sip:888 at 192.168.1.101;user=phone>;tag=vmNpFtt7t5t1D
   Call-ID: ff78246e-9eeda51f-a54bce3c at 192.168.1.102
   CSeq: 1 INVITE
   User-Agent: FreeSWITCH-mod_sofia/1.5.12b+git~20140320T233219Z~dd242f3ba6~32bit
   Accept: application/sdp
   Allow: INVITE, ACK, BYE,
 CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
   Supported: timer, path, replaces
   Allow-Events: talk, hold,
 conference, refer
   Reason: Q.850;cause=16;text="NORMAL_CLEARING"
   Content-Length: 0
   Remote-Party-ID: "kb-888" <kb-888>;party=calling;privacy=off;screen=no
   
Unfortunately, i'm new to sip, kamailio and freeswitch so I apologize in advanced if I've missed something basic.  but I've been over the article and have tried to ensure that I did every step.
The good news is that conference calls work!  But i can't call between extensions or get voicemail working.


I've attached a tcpdump on port 5060 from my kam server.

I'm not expecting hand holding but even if you could just tell me which module i should look into or additional steps on how to troubleshoot, that'd be great.
So far, I've turned on debugging using the freeswitch cli, and I'm using tcpdump for the kam side of things. 


thanks. 




On Monday, March 24, 2014 11:43:05 AM, mark li <limark67 at yahoo.com> wrote:
 
Hi there.  I'm a noobie to Kamailio and Freeswitch... but I'm trying to follow the article located here: 

http://kb.asipto.com/freeswitch:kamailio-3.1.x-freeswitch-1.0.6d-sbc


I've tried to add all the sections marked with WITH_FREESWITCH in the sample config in the article into my own kamailio-advanced.cfg file. 
Here's what my cfg file looks like: 
http://pastebin.com/KsvrYVN7


I've restarted kamailio after making these changes. 
Then I tried to dial 41 to listen to vmail or 44999 to leave a message for user 999 but both return a busy tone. 

Any suggestions would be appreciated.
Thanks.
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140327/c02e0750/attachment.html>


More information about the sr-users mailing list