Asterisk doesn't take softphoe(X-lite/Zoiper) Pressed Digit

hi to all,

I am using Festival TTS with Asterisk. I put asterisk on remote machine and I trying to connect with remote asterisk with  X-lite softphone from my windows machine.

I can hear sound but when I press any digit, the asterisk doesn't take the pressed digit even if i have written code to handle it. 
 
I was forwarded all ports which are required for sip, rtp and asterisk ith both sided firewalls.  Also, I made following changes in sip.conf,

“nat=yes” and
"qualify=yes"

and I also gives an proxy in x-lite that is, stun.counterpath.net
and I also tried the same thing with zoiper softphone.
but, the results are same, both phone’s pressed digits are not recived a asterisk.

I am also giving the sip.conf some lines that helpful for you also for providing me
a solution

sip.conf
[102]
callerid=102 <102>
canreinvite=no
dtmfmode=rfc2833
host=dynamic
nat=yes
port=5060
qualify=yes
record_in=Adhoc
record_out=Adhoc
secret=102
type=friend
context=sip
username=102

please help me out. :frowning:

Thanks in advance. :smile:

Regards,
Deepen

hi,

Anybody can please help me out from above mentioned problem. If you are not understanding anything, please freely write down what u not understand, as possible as I give you all details.

  My asterisk was ran on remote machine on Suse 10 enterprise version which have public IP and I also cross checked that all ports are forwarded properly from Firewall (suse's firewall and ISP firewall), and my client(another remote machine) is on  windows  i.e. X-Lite/Zoiper.

But, the problem is, when I pressed any digit from my Client (X-Lite/Zopier) the asterisk server does not retrieve/ receive that pressed digits as I write down an code for handling. On client I hear an sound of pressing digit but the asterisk server doesn’t receive any pressed digits. And yes, I am using Festival TTS engine.

If I dial extension through command line on asterisk server then it work porperly. But from my client (X-Lite/Zoiper) it’s not work means. it’s only plays an sound but not receive any pressed digit which code also I wrote and also gives an warning also, that warning is

WARNING[18406]: chan_sip.c:1947 retrans_pkt: Maximum retries exceeded on transmission

after that it’s hangup imediately by an asterisk.

Now, I also mentioned an ouput comes out by command
sip show peer 102

  • Name : 102
    Secret :
    MD5Secret :
    Context : sip
    Subscr.Cont. :
    Language :
    AMA flags : Unknown
    Transfer mode: open
    CallingPres : Presentation Allowed, Not Screened
    Callgroup :
    Pickupgroup :
    Mailbox :
    VM Extension : asterisk
    LastMsgsSent : 32767/65535
    Call limit : 0
    Dynamic : Yes
    Callerid : “102” <102>
    MaxCallBR : 384 kbps
    Expire : 3202
    Insecure : no
    Nat : Always
    ACL : No
    T38 pt UDPTL : No
    CanReinvite : No
    PromiscRedir : No
    User=Phone : No
    Video Support: No
    Trust RPID : No
    Send RPID : No
    Subscriptions: Yes
    Overlap dial : No
    DTMFmode : rfc2833
    LastMsg : 0
    ToHost :
    Addr->IP : 122.169.102.141 Port 11188
    Defaddr->IP : 0.0.0.0 Port 5061
    Def. Username: 102
    SIP Options : (none)
    Codecs : 0xe (gsm|ulaw|alaw)
    Codec Order : (gsm:20,ulaw:20,alaw:20)
    Auto-Framing: No
    Status : OK (466 ms)
    Useragent : X-Lite release 1011s stamp 41150
    Reg. Contact : sip:102@122.169.102.141:11188;rinstance=2af94a12377c22e7

So, I think, now somebody can help me out from this all. Please share your valuable knowledge.

Thanks,
Deepen

hi,

Anybody can please help me out from above mentioned problem. If you are not understanding anything, please freely write down what u not understand, as possible as I give you all details.

  My asterisk was ran on remote machine on Suse 10 enterprise version which have public IP and I also cross checked that all ports are forwarded properly from Firewall (suse's firewall and ISP firewall), and my client(another remote machine) is on  windows  i.e. X-Lite/Zoiper.

But, the problem is, when I pressed any digit from my Client (X-Lite/Zopier) the asterisk server does not retrieve/ receive that pressed digits as I write down an code for handling. On client I hear an sound of pressing digit but the asterisk server doesn’t receive any pressed digits. And yes, I am using Festival TTS engine.

If I dial extension through command line on asterisk server then it work porperly. But from my client (X-Lite/Zoiper) it’s not work means. it’s only plays an sound but not receive any pressed digit which code also I wrote and also gives an warning also, that warning is

WARNING[18406]: chan_sip.c:1947 retrans_pkt: Maximum retries exceeded on transmission

after that it’s hangup imediately by an asterisk.

Now, I also mentioned an ouput comes out by command
sip show peer 102

  • Name : 102
    Secret :
    MD5Secret :
    Context : sip
    Subscr.Cont. :
    Language :
    AMA flags : Unknown
    Transfer mode: open
    CallingPres : Presentation Allowed, Not Screened
    Callgroup :
    Pickupgroup :
    Mailbox :
    VM Extension : asterisk
    LastMsgsSent : 32767/65535
    Call limit : 0
    Dynamic : Yes
    Callerid : “102” <102>
    MaxCallBR : 384 kbps
    Expire : 3202
    Insecure : no
    Nat : Always
    ACL : No
    T38 pt UDPTL : No
    CanReinvite : No
    PromiscRedir : No
    User=Phone : No
    Video Support: No
    Trust RPID : No
    Send RPID : No
    Subscriptions: Yes
    Overlap dial : No
    DTMFmode : rfc2833
    LastMsg : 0
    ToHost :
    Addr->IP : 122.169.102.141 Port 11188
    Defaddr->IP : 0.0.0.0 Port 5061
    Def. Username: 102
    SIP Options : (none)
    Codecs : 0xe (gsm|ulaw|alaw)
    Codec Order : (gsm:20,ulaw:20,alaw:20)
    Auto-Framing: No
    Status : OK (466 ms)
    Useragent : X-Lite release 1011s stamp 41150
    Reg. Contact : sip:102@122.169.102.141:11188;rinstance=2af94a12377c22e7

So, I think, now somebody can help me out from this all. Please share your valuable knowledge.

Thanks,
Deepen

  1. Check your sip client uses rfc2833 method to send dtmf, because you defined this method for the 102 peer in sip.conf.
  2. Start the rtp debug and check if rtp packets are sent and received, if not check sip.conf and firewall configuration.

Hope this helps.

Cheers.

Marco Bruni

Hi Marco ,

First of all Thank you for your valuable advice.

I checked with X-Lite and did not find any setting in X-Lite to configure this.
Also all packets of RTP packets are received properly at both the ends.

after [color=red][size=100]“rtp debug”[/size][/color] command I got following result,

[color=red][size=125] RTP-stats

  • Our Receiver:
    SSRC: 0
    Received packets: 0
    Lost packets: 1
    Jitter: 0.0000
    Transit: 0.0000
    RR-count: 0
  • Our Sender:
    SSRC: 1818035916
    Sent packets: 697
    Lost packets: 0
    Jitter: 0
    SR-count: 3
    RTT: 0.000000[/size][/color]

Any help on this will be really helpful.
Please help me in this as I’m stuck here for more than one month.

Thanks,
Deepen.

After the rtp debug try a call to see if packets are sent/received, also you should see the digits pressed in the rtp flow if both ends are using rfc2833.

Cheers.

Marco Bruni

Hi Marco,

I can check that packets are sent from asterisk console but I don’t know where to check RTP packets received?
I sent packets I’m not getting any digits pressed.

Also, In X-Lite Soft phone I’m not getting where we can specify “dtmfmode = rfc2833”.
But I read documentation of x-lite and it tells that x-lite by default supports rfc2833.

I’m here bit confused with these things. can you please express this in more detailed information. so that I can get where the actual problem is.

Thank you very much,
Deepen.

Where you see the sent packets you should see also the received, here is a sample:

Got  RTP packet from    192.168.200.???:60000 (type 00, seq 008457, ts 1225280, len 000160)
Sent RTP packet to      192.168.200.?:6180 (type 00, seq 013876, ts 1225280, len 000160)

Seems to me you are having problem with your firewall or the nat configuration of your Asterisk (check sip.conf); also try a call from X-lite to an internal phone or listen to a sound file and check what happens with the help of the rtp debug and the sip debug.

Cheers.

Marco Bruni

Hi Marco,

We are getting only sent packets on asterisk console under “rtp debug” which are as follows ,

Sent RTP packet to      122.169.102.141:10364 (type 00, seq 045291, ts 109360, len 000160)
Sent RTP packet to      122.169.102.141:10364 (type 00, seq 045292, ts 109520, len 000160)
Sent RTP packet to      122.169.102.141:10364 (type 00, seq 045293, ts 109680, len 000160)
Sent RTP packet to      122.169.102.141:10364 (type 00, seq 045294, ts 109840, len 000160)
Sent RTP packet to      122.169.102.141:10364 (type 00, seq 045295, ts 110000, len 000160)
Sent RTP packet to      122.169.102.141:10364 (type 00, seq 045296, ts 110160, len 000160)
Sent RTP packet to      122.169.102.141:10364 (type 00, seq 045297, ts 110320, len 000160)
Sent RTP packet to      122.169.102.141:10364 (type 00, seq 045298, ts 110480, len 000160)
Sent RTP packet to      122.169.102.141:10364 (type 00, seq 045299, ts 110640, len 000160)
Sent RTP packet to      122.169.102.141:10364 (type 00, seq 045300, ts 110800, len 000160)

after this it gives me following warning.


[Mar 19 13:35:46] WARNING[20360]: chan_sip.c:1947 retrans_pkt: Maximum retries exceeded on transmission ZGFiYjM2NzM2NWY5Zjg0ODFiNDQyYmZiZmE4NmVkMWQ. for seqno 2 (Critical Response)

Note that:
I’m posting here some part of rtp debug log received after I typed command “rtp debug”.

In these I’m not getting any received packet as you have mentioned.
Also, Here when I press any digits I’m not getting pressed digit in above rtp log.
My sip.conf is as follows,


[101]
callerid=101 <101>
canreinvite=no
dtmfmode=rfc2833
host=dynamic
nat=yes
port=5060
bindport=5060
bindaddr=0.0.0.0
qualify=yes
record_in=Adhoc
record_out=Adhoc
secret=101
type=friend
context=sip
username=101
allow=all

[102]
callerid=102 <102>
canreinvite=no
dtmfmode=rfc2833
host=dynamic
nat=yes
port=5061
qualify=yes
record_in=Adhoc
record_out=Adhoc
secret=102
type=friend
context=sip
username=102
allow=all

and I’ve registered my x-Lite to 102.

also I did not get anything from “sip debug”.[It’s giving me many things even after call Hung up.]

Thanks,
Deepen

The remote server has a public ip or a private ip ? I mean is it behind a firewall ?
In sip.conf what are the values for the parameters externip and localnet, because they are important too ?

Cheers.

Marco Bruni

Hi Marco,

The asterisk(remote server) is on public IP.

Asterisk server is runs on Linux SUSE enterprise 10 and I have forwarded following ports from an firewall of SUSE Linux,

[color=red]All forwarded ports are as follows:
5060:5670 8766:20000 8585 8000 3478[/color]

also we haven’t specify Loacalnet and externip options under sip.conf as we dont know, what sholuld I specify there?

Thanks,
Deepen

Hi…

I have also tried with localnet = 192.168.0.0/255.255.0.0.
and also specified externip in sip.conf but that does not created any difference in behavior.

Thanks,
Deepen

If the server has a public ip and isn’t behind the firewall set, in sip.conf, nat=no and just open the relevant ports, don’t do forwarding, in the client just use stun protocol to bypass the firewall/router local to the client.
By the way, I would try the setup with a local server before and when it works I would try with the remote server.

I think I can’t help more about, sorry and good luck.

Cheers.

Marco Bruni

Thanks Marco,

I really appreciate that.

I have tried whole setup first on the local machine here. Also I tried by putting that machine on public IP. I both cases It was working fine.

but for this far machine we are facing problem.

also if I disable nat then my x-lite does not gets registered at all.

any way thanks for your great help.
and we’ll meet in future on this forum.

Thanks again,
Deepen

Thanks Marco,

I really appreciate that.

I have tried whole setup first on the local machine here. Also I tried by putting that machine on public IP. I both cases It was working fine.

but for this far machine we are facing problem.

also if I disable nat then my x-lite does not gets registered at all.

any way thanks for your great help.
and we’ll meet in future on this forum.

Thanks again,
Deepen

hi to all,

Can any body help me out from above problem.

Regards,
Deepen