FreePBX and a Cisco 7940 Phone

May 24, 2006

So, it has been months since I posted something technical on my website. For the most part it has been music stuff as well as general updates on the overall infrastructure of the site. However, for the past month or so I’ve been working on getting a Cisco SIP phone working with FreePBX. However, the problem was that I was not able to receive inbound calls.

This was the not so descriptive error:

    -- Called 2000 
; my sip extension
    -- Got SIP response 400 "Bad Request" back from 192.168.1.102 
; sip reply
    -- SIP/2000-7b88 is circuit-busy 
; this cause the call to go straight to VM

Looking at the logs and googling for weeks on the problem, it was possible that the problem was the following:

    -- Executing NoOp("Zap/1-1", "Using CallerID 
""LastName FirstName   "" <11234567890>") in new stack

Please note the double quotes around my name.Now, after talking to X-Rob on the #freepbx channel, he pointed me to the extensions.conf file where the CallerID seems to be handled or generated.

I looked at the last commit X-Rob made and compared it to the previous one:

Revision 1891:

exten => s,n,GotoIf($["${AMPUSERCIDNAME:1:2}" = ""]?report)
exten => s,n,Set(CALLERID(all)="${AMPUSERCIDNAME}" <${AMPUSER}>)

Revision 1900:

exten => s,n,GotoIf($["x${AMPUSERCIDNAME:1:2}" = "x"]?report)
exten => s,n,Set(CALLERID(all)=${AMPUSERCIDNAME} <${AMPUSER}>)

However, this latest change still did not eliminate the double quotes from the CallerID.

So, I removed the quotes around the variable x and inbound calls finally worked! Looking at the logs however I do get an unknown name for the CallerID field, but at this point I don’t really care. I will try to work on the code and see if I can figure out the “correct” way to fix this issue, but for now I’m just happy I’m able to receive inbound calls.

Here is what the logs show with the “” removed from around the x:

    -- Called 2000 
; my sip ext againg
    -- SIP/2000-0e25 is ringing 
; my phone ringing
    -- SIP/2000-0e25 answered Zap/1-1 
; me answering the phone



Cheers

posted in Linux, Technology by dmacias

Follow comments via the RSS Feed | Leave a comment | Trackback URL

Leave Your Comment

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org