Hi,

 

I've been playing around with CFIM and CFBS and came across something rather odd.  I found that a SIP X-lite phone didn't give the expected results when running the sample CFIM/CFBS code from the Wiki - see http://www.voip-info.org/tiki-index.php?page=Asterisk%20call%20forwarding#comments

 

Barring the odd typo in the coded example, it worls reasonably well for ZAP and IAX users but the dial string which comes down the line from the SIP softphone is odd - it sends a decimal representation of the hexadecimal for the # key (as far as I can tell) - what actually arrives in the buffer is "%23".

 

Here are three log traces one for each of SIP ZAP and IAX showing (in the NoOp) the actual dialstring.

 

It's not actually a problem because I've decided to code up my dialplan a little differently, however it looks like an inconsistency somewhere.  Anyone enlighten me?

 

Inbound from SIP softphone (X-Lite)

 

-- Executing NoOp("SIP/3000-168a", "*21*3002%23") in new stack

    -- Executing GotoIf("SIP/3000-168a", "1?3:4") in new stack

    -- Goto (internal,*21*3002%23,3)

    -- Executing StripLSD("SIP/3000-168a", "3") in new stack

    -- Executing DBput("SIP/3000-168a", "CFIM/3000=3002") in new stack

    -- DBput: family=CFIM, key=3000, value=3002

    -- Executing Playback("SIP/3000-168a", "activated") in new stack

    -- Playing 'activated' (language 'en')

    -- Executing Hangup("SIP/3000-168a", "") in new stack

  == Spawn extension (internal, *21*3002, 6) exited non-zero on 'SIP/3000-168a'

    -- Executing Hangup("SIP/3000-168a", "") in new stack

  == Spawn extension (internal, h, 1) exited non-zero on 'SIP/3000-168a'

sark*CLI>

 

 Inbound from ZAP/1

 

 -- Starting simple switch on 'Zap/1-1'

    -- Executing NoOp("Zap/1-1", "*21*3002#") in new stack

    -- Executing GotoIf("Zap/1-1", "0?3:4") in new stack

    -- Goto (internal,*21*3002#,4)

    -- Executing DBput("Zap/1-1", "CFIM/=3002#") in new stack

    -- DBput: family=CFIM, key=, value=3002#

    -- Executing Playback("Zap/1-1", "activated") in new stack

    -- Playing 'activated' (language 'en')

    -- Executing Hangup("Zap/1-1", "") in new stack

  == Spawn extension (internal, *21*3002#, 6) exited non-zero on 'Zap/1-1'

    -- Executing Hangup("Zap/1-1", "") in new stack

  == Spawn extension (internal, h, 1) exited non-zero on 'Zap/1-1'

    -- Hungup 'Zap/1-1'

sark*CLI>

 

 Inbound from IAX softphone (Firefly)  

 

-- Accepting AUTHENTICATED call from 192.168.1.21:

       > requested format = gsm,

       > requested prefs = (),

       > actual format = gsm,

       > host prefs = (g729|gsm|ilbc|g726|ulaw|alaw),

       > priority = mine

    -- Executing NoOp("IAX2/[EMAIL PROTECTED]", "*21*3002#") in new stack

    -- Executing GotoIf("IAX2/[EMAIL PROTECTED]", "0?3:4") in new stack

    -- Goto (internal,*21*3002#,4)

    -- Executing DBput("IAX2/[EMAIL PROTECTED]", "CFIM/3002=3002#") in new stack

    -- DBput: family=CFIM, key=3002, value=3002#

    -- Executing Playback("IAX2/[EMAIL PROTECTED]", "activated") in new stack

    -- Playing 'activated' (language 'en')

    -- Executing Hangup("IAX2/[EMAIL PROTECTED]", "") in new stack

  == Spawn extension (internal, *21*3002#, 6) exited non-zero on 'IAX2/[EMAIL PROTECTED]'

    -- Executing Hangup("IAX2/[EMAIL PROTECTED]", "") in new stack

  == Spawn extension (internal, h, 1) exited non-zero on 'IAX2/[EMAIL PROTECTED]'

    -- Hungup 'IAX2/[EMAIL PROTECTED]'

sark*CLI>

 

Dialplan fragment  - coded to catch the SIP dialstring.

 

;====================================================================

; Unconditional Call Forward (CFIM)

;====================================================================

; create call forward

exten => _*21*.,1,NoOp,$\{EXTEN\}

exten => _*21*.,2,GotoIf($["$\{EXTEN:-3:3\}" = "%23"]?3:4)

exten => _*21*.,3,StripLSD(3)

exten => _*21*.,4,DBput(CFIM/$\{CALLERIDNUM\}=$\{EXTEN:4\})

exten => _*21*.,5,Playback(activated)

exten => _*21*.,6,Hangup

 

 

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: 27/04/2005
_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to