[Freeswitch-users] SIP INFO based DTMF detection problem and remedy.

Keith Laaks keithl at voxtelecom.co.za
Sun Sep 9 11:58:45 PDT 2007


Hi All,

With Sofia talking to a gw using SIP INFO for DTMF transport, I was not able
to get any DTMF based features (e.g. IVR) to work.
In the traces I saw the following when I pressed a key on the phone (in this
example, key=4):

****************************************************************************
**********************************
I send 489 bytes to udp/[44.33.22.11]:5060 at 16:43:54.656234:
   ------------------------------------------------------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP
44.33.22.11:5060;rport=5060;branch=z9hG4bK848e4e821f09dcf2847c25da87f5296b
   From: <sip:27118091700 at 44.33.22.11:5060>;tag=GR52RWG346-34
   To: "unknown" <sip:878050000 at 99.88.77.66>;tag=7pBSryH1mjBUg
   Call-ID: a666e4af-d996-122a-9e99-000a9d08b6ea
   CSeq: 4 INFO
   User-Agent: FreeSWITCH(mod_sofia)
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,
NOTIFY, REFER, UPDATE, REGISTER, INFO
   Supported: 100rel, precondition
   Content-Length: 0
   
   ------------------------------------------------------------------------
nta: sent 200 OK for INFO (4)
nua(0x815c130): event i_info 200 OK
nua: nua_event: entering
[33m2007-09-09 18:43:54 [DEBUG] sofia.c:1643 sofia_handle_sip_i_info()
Unknown INFO Recieved:  sip:27118091700 at 44.33.22.11:5060[signal=4
duration=100] 
****************************************************************************
**********************************

Looking through the code, I found in sofia.c:

****************************************************************************
**********************************

void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile,
nua_handle_t *nh, switch_core_session_t *session, sip_t const *sip, tagi_t
tags[])
{

//placeholder for string searching
char *signal_ptr;

//Try and find signal information in the payload
signal_ptr = strstr(sip->sip_payload->pl_data, "Signal=");

//See if we found a match
if (signal_ptr) {
struct private_object *tech_pvt = NULL;
switch_channel_t *channel = NULL;
char dtmf_digit[2] = { 0, 0 };

//Get the channel
channel = switch_core_session_get_channel(session);
Etc.etc.
****************************************************************************
***********************************

Note that the line "signal_ptr = strstr(sip->sip_payload->pl_data,
"Signal=");" has the 'S' in 'Signal=' capitalized. 
But from the above traces it appears sofia sends the INFO string through to
freeswitch in lower case. 

That's why freeswitch was not 'getting' the DTMF correctly.

After just changing this to lower case and recompiling - works perfectly!

Not sure, but maybe the code needs to be ammended to check for both
variants?

Would be interesting to know if this issue impacted any other freeswitch
users - could also be an issue with my voip connection talking to kit not
compling with latest standards.

Let me know if this was of any use. 


Best Regads 
 
Keith

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20070909/30ec4c59/attachment-0002.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5125 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20070909/30ec4c59/attachment-0002.bin 


More information about the FreeSWITCH-users mailing list