Recherche dans le site/ Search this Blog:

Login



Important thing to look at if you get one way audio problem with Asterisk 1.4.10 and FreePBX 2.3.0 Imprimer

We've had a weird problem where we though that there must be gremlins in the network or providers playing tricks on us. We've tried everything, reviewing our firewall rules, inserting log statements in our firewall rules, running tcpdump, analyzing STUN server traffic, everything !!

 

We have lost quite a bit of time looking in the wrong place (e.g. the network). We found out that Asterisk (version 1.4.10 and below) has some problems in filtering invalid characters in CIDNAME (CallerID Name). The problem could have been caused exclusively by our custom CIDNAME lookup application but it could affect other users, we did not take the time to look into it further.

Scenario :

Asterisk send the CIDNUMBER and the CIDNAME to our custom CIDNAME lookup application. If our application doesn't find detailed info related to the CIDNUMBER , it just sends back the CIDNAME name that Asterisk sent to us in the first place. We had to patch our application so it trims invalid chars from the CIDNAME that Asterisk sent us in the first place before returning it to Asterisk to solve our one way audio problem.

The one way audio problem was caused by Asterisk and/or devices sending invalid SIP packets.

Symptom :

Look for open double quotes without a closing one in your SIP packets by running asterisk -r and then sip debug.

Example:

SIP/2.0 200 OK
Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:5060;branch=z9hG4bK4a2fdbb1;rport
From:

"

To: <sip: Cette adresse email est protégée contre les robots des spammeurs, vous devez activer Javascript pour la voir. :61315>;tag=2a078efd6230ec21
Call-ID: Cette adresse email est protégée contre les robots des spammeurs, vous devez activer Javascript pour la voir.

CSeq: 102 OPTIONS
User-Agent: Grandstream GXP2000 1.1.1.14
Warning: 399 xxx.xxx.xxx.xxx "detected NAT type is symmetric NAT"
Contact: <sip: Cette adresse email est protégée contre les robots des spammeurs, vous devez activer Javascript pour la voir. :60429>
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Supported: replaces, timer
Content-Length: 0

That One-Way audio problem with Asterisk 1.4.10 and FreePBX 2.3.0 that we spent so much time on had nothing to do with the network ! Just with stupid malformed headers ;-(

 

 

 

 

Commentaires / Comments (4)
where can I get the patch
1 lundi, 30 juin 2008 11:38
Prabhakar
Hi,

I am having the same issue it will be great if u let me know where I can get the patch

Thanks,
Re: where can I get the patch
2 lundi, 04 août 2008 21:53
oc9
There is no patch available from us. This article was merely a pointer to where to look at for the source of problems.

As stated in the article, we simply fixed our Caller ID lookup script to eliminate invalid characters. (We simply piped all called program output to the "strings" (program /usr/bin/strings).

As mentioned in the article, we could have introduced the problem ourselves but we wanted to point out the fact that asterisk should filter out invalid characters for any fields it sends out in SIP packets. So in the best world, our problem would never have occured.

This is a basic priciple that is applied in every robust piece of software. If a real life use case is needed as example, look at how hibernate filters out/escape invalid characters to avoid SQL injections.

So, the point of the article was to highlight that asterisk would need more robustness at handling CALLER_ID or any other fields provided by custom programs. Asterisk should not blindly forward those fields in the SIP packets it is sending out.

We haven't put any efforts into locating the spot in asterisk source in order to accomplished that, we apologize for that. ;-(
issue over ISDN
3 mardi, 11 novembre 2008 16:01
Tammy
could this be the same issue over ISDN and not SIP using the Asterisk and FreePBX
Caller ID
4 mercredi, 02 décembre 2009 11:23
Clint Chapman
I had the same problem with one particular caller. I added an entry to the asterisk phonebook so the caller id would come from there instead of the other superfecta sources. Not a complete solution but it fixed the problem. Thanks for the tip!!

Ajouter votre commentaire / Add your comment

Votre nom / Your name:
Sujet / Subject:
Commentaire:
SPAM: Ne pas inclure de lien ou utiliser le stratagème suivant: "yahoo.com slash mapage.html"     Nous utilisons un filtre qui bloque les commentaires suspects avec une erreur 403. De même, du code de programmation ou sql peut provoquer des erreurs 403. Veuillez utiliser un lien vers votre code tel que: "pastebin.com slash jVNqLieD"    Merci!
Comment:
SPAM: Do not include any links in your post or use the following construct: "yahoo.com slash mypage.html"    We are using a filter that denies suspicious posts with a 403 error. Programming language or SQL code may also cause a 403 error. Please provide a link to your code instead like: "pastebin.com slash jVNqLieD"    Thank you! :
  Lettres de vérification; lettres minuscules seulement, pas d
Retaper les lettres affichées / Word verification:
Mis à jour / Last updated ( mercredi, 26 mars 2008 22:53 )
 



Consultez TOUS nos fils d'actualité ici. / View ALL our newsfeed here.