[Asterisk-Users] Proper handling of incoming IAX/SIP callerids to be able to call back - why is calleridnum stripping dots out of number ?

Robert Rozman rozman at fri.uni-lj.si
Fri Feb 11 02:54:45 MST 2005


Hi,

I'd like to organize my Asterisk to properly handle incoming SIP/IAX/H323
callerids so they can be called back if needed.

I have three incoming contexts for sip, iax and h323 calls.

To each incoming call I'd like to prepend certain number that will be
catched with pattern matching on output calls. For instance for iax I have:
[from-iax]
exten => s,1,NoOp(IAX call from outside ${CALLERID}: Name: ${CALLERIDNAME},
Number: ${CALLERIDNUM})
exten => s,2,Wait,2
exten => s,3,SetCIDNum(1${CALLERIDNUM})
exten => s,4,NoOp(IAX call from outside ${CALLERID} changed : Name:
${CALLERIDNAME}, Number: ${CALLERIDNUM})
;exten => s,3,SetCallerID(${CALLERIDNUM})
exten => s,5,Goto(from-pstn,s,1)

and when executed :

    -- Accepting unauthenticated call from 193.77.90.224, requested format =
2, actual format = 2
    -- Executing NoOp("IAX2/guest at 252/2", "IAX call from outside "Robert
Rozman" <252 at posta.etrust.si>: Name: Robert Rozman| Number:
252 at postaetrustsi") in new stack
    -- Executing Wait("IAX2/guest at 252/2", "2") in new stack
    -- Executing SetCIDNum("IAX2/guest at 252/2", "1252 at postaetrustsi") in new
stack
    -- Executing NoOp("IAX2/guest at 252/2", "IAX call from outside "Robert
Rozman" <1252 at postaetrustsi> changed : Name: Robert Rozman| Number:
1252 at postaetrustsi") in new stack
    -- Executing Goto("IAX2/guest at 252/2", "from-pstn|s|1") in new stack
    -- Goto (from-pstn,s,1)
    -- Executing GotoIf("IAX2/guest at 252/2", "1?from-pstn-reghours|s|1:") in
new stack

So in Variable  ${CALLERID} is right (with dots in iax address) but not the
case with  ${CALLERIDNUM} that has dots stripped off. So now I cannot
callback cause proper address is lost. On outgoing part I have:
[outbound-iax]
exten => _2.,1,NoOp(Outbound IAX call from local extension ${CALLERID} to
${EXTEN:1})
exten => _2.,2,NoOp
exten => _2.,3,Dial(IAX2/${EXTEN:1})
exten => _2.,4,Congestion()

but it won't work, cause dots were stripped out....

Is there something wrong with my way of handling this problem? Is there any
better way to handle incoming calls, so they can be called back with click
on recent calls ?
How to handle this when there is equpment that cannot show callerid names
(like BT100)  - for each extension separately or somehow different ?

Has anyone working example of proper handling of incoming nontrunk
iax/sip/h323 calls ? Any advice ?


Thanks in advance,

regards,

Rob.





More information about the asterisk-users mailing list