Not able to put call on hold

sujit
Joined: Tue 12 of Aug, 2008

Not able to put call on hold

Posted:Fri 29 of Aug, 2008 (02:46 UTC)
Hi there,
I have registered my asterisk box as SIP client to 3rd party SIP server and registered a FXS number.
I can make incoming call to the number and outgoing call from the number to my mobile successfully.
But I can not put call oh hold from . Please help.

Thanks in advance.

~Sujit Das


==================
extensions.conf
==================
;
;DO NOT MODIFY, FILE AUTOMATICALLY GENERATED BY SCRIPT configure_asterisk
;
[globals]  ;Sujit

[general]
static=yes
writeprotect=no
;autofallthrough=yes ;Sujit

[default]
include => phones
include => parkedcalls

;sujit - start

[phones] ; sujit
include => internal ; sujit
include => remote   ; sujit


[internal]
;exten => _1XX,1,NoOp()
;exten => _1XX,n,Macro(stdexten, SIP/${EXTEN},30)
;exten => _1XX,n,Playback(the-number-is-unavail)
;exten => _1XX,n,Hangup()

[remote]
;exten => _7XX,1,NoOp()
;exten => _7XX,n,Macro(stdexten,SIP/${EXTEN}@192.168.2.200)
;exten => _7XX,n,Hangup()


;exten => _X.,1,NoOp()
;exten => _X.,n,Macro(stdexten,SIP/${EXTEN}@my-singtel-server,30,tr) 
;exten => _X.,n,Hangup()

exten => _9XXXXXXXX,1,NoOp()
exten => _9XXXXXXXX,n,Dial(SIP/${EXTEN:1}@my-singtel-server,30,tr)
exten => _9XXXXXXXC,n,Hangup()

;exten => _9XXXXXXX,n,Macro(stdexten,SIP/${EXTEN}@my-singtel-server)
;exten => _9XXXXXXX,n,Hangup()



;[AsteriskSER_incoming]  ; sujit
;exten => 101,1,NoOp()
;exten => 101,n,Macro(stdexten,MSPD/phone0,,101)

;exten => 102,1,NoOp()
;exten => 102,n,Macro(stdexten,MSPD/phone1,,102)

;exten => 103,1,NoOp()
;exten => 103,n,Macro(stdexten,MSPD/phone2,,103)

;exten => 104,1,NoOp()
;exten => 104,n,Macro(stdexten,MSPD/phone3,,104)


;sujit - end




;connecting to other network which has 1XX numbers thru SIP protocol
;A.B.C.D is IP-Address of other board
;replace A.B.C.D and reload configuration files
;exten => _4xx,1,Macro(stdexten,SIP/${EXTEN}@A.B.C.D,,401)
;connecting to other network which has 2XX numbers thru SIP protocol
exten => _5xx,1,Macro(stdexten,SIP/${EXTEN}@A.B.C.D,,401) 
exten => 101,1,Macro(stdexten,MSPD/phone0,,101)
exten => AAAAAAAA,1,Macro(stdexten,MSPD/phone1,,AAAAAAAA)

exten => 104,1,Macro(stdexten,MSPD/phone3,,104)


exten => 202,1,Macro(stdexten,SIP/202,,202)
exten => 203,1,Macro(stdexten,SIP/203,,203)
exten => 204,1,Macro(stdexten,SIP/204,,204)

exten => s,1,GotoIf($[${LEN(${ARG3})} > 0]?4)
exten => s,2,SetVar(VMBOX=${MACRO_EXTEN})
exten => s,3,Goto(5)
exten => s,4,SetVar(VMBOX=${ARG3})
exten => s,5,Dial(${ARG1},20,t${ARG2})
exten => s,6,Goto(s-${DIALSTATUS},1)
exten => s-ANSWER,1,Hangup
exten => s-BUSY,1,Voicemail(b${VMBOX})
exten => s-BUSY,2,Hangup
exten => _s-.,1,Voicemail(u${VMBOX})
exten => _s-.,2,Hangup


exten => 1234,1,VoiceMailMain()
exten => 1234,1,NoOp(${EXTEN})
exten => 1234,2,NoOp(${MACRO_EXTEN})
exten => 1234,3,Hangup()


[macro-stdexten]
exten => s, 1, Dial(${ARG1}, 25, tT)
exten => s, 2, SetVar(VMBOX=${MACRO_EXTEN})
exten => s, 3, NoOp(${MACRO_EXTEN})
exten => s, 4, NoOp(${VMBOX})
exten => s, 5, Goto(s-${DIALSTATUS},1)
;exten => s-ANSWER,1,Hangup ; sujit
exten => s-ANSWER,1,Goto(1) ; sujit
exten => s-BUSY,1,Voicemail(b${VMBOX})
;exten => s-BUSY,2,Hangup ; sujit
exten => s-BUSY,2,Goto(1) ; sujit
;exten => _s-.,1,Voicemail(u${VMBOX})
exten => _s-.,1,Goto(1) ; sujit
;exten => _s-.,2,Hangup ; sujit
exten => _s-.,2,Goto(1) ; sujit
#exten => s, 2, Goto(s, 102)
#exten => s, 102, Playback(vm-nobodyavail)
#exten => s, 103, Hangup()


====================
sip.conf
====================
;
;DO NOT MODIFY, FILE AUTOMATICALLY GENERATED BY SCRIPT configure_asterisk
;

[general]
CONTEXt=default                 ; Default context for incoming calls
bindport=5060                   ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
disallow=all
allow=ulaw,alaw,g729                ;also defines preference
dtmfmode=rfc2833
tos=0x10
defaultexpiry=3600              ;added by Sujit default registration expiry timer



register => AAAAAAAA:XXXXXXXXX@203.126.17.242:5060/AAAAAAAA  ;register to external sip server





[my-singtel-server]
username=AAAAAAAA
type=friend
secret=XXXXXXXXX
host=203.126.17.242
fromuser=AAAAAAAA
fromdomain=203.126.17.242
dtmfmode=rfc2833
auth=md5
canreinvite=yes ;no
insecure=very
qualify=yes
nat=no
disallow=all
allow=gsm
allow=ulaw
allow=alaw


[2345]
type=peer
context=default   ; Where to start in the dialplan when this phone calls
username=2345; SIP username for registration
secret=2345; SIP password for registration
host=dynamic   ; Sip phone has a dynamic IP address
canreinvite=yes   ; allow RTP voice traffic to bypass Asterisk
insecure=invite

[202]
type=friend
context=default
username=202
secret=202
callerid=202
host=dynamic
canreinvite=no

[203]
type=friend
context=default
username=203
secret=203
callerid=203
host=dynamic
canreinvite=no

[204]
type=friend
context=default
username=204
secret=204
callerid=204
host=dynamic
canreinvite=no