Roger Schreiter
2005-Jan-26 14:59 UTC
[Asterisk-Users] mySQL-sipfriend dials to another SIP-endpoint - How to set the from-user
Hi, I have some mySQL-sipfriends and connectivity to PSTN. When a call from PSTN comes, it shows a callerid, and that callerid is displayed at the called sip phone. When the call comes from another sip user (defined as mySQL-sipfriend), no callerid is displayed at the called sip phone. I turned on sip debug and discovered, that in the last case in the SIP-header to the called phone: From: "Unknown" <sip:Unknown@... I put in a noOp(${CALLERID}) and found in both case reasonable callerids. I even set the callerid with setCallerID("test user"<12334>) to absolute identical values: When call comes from PSTN, those values are displayed in the outgoing SIP header (and finally the called sip phone). When call comes from SIP, there is still "unknown" displayed in the outgoing SIP header (and nothing in the called sip phone). How can I force chan_sip to use the values from ${CALLERID}? Thanks for hints! Roger.
Roger Schreiter
2005-Jan-26 19:33 UTC
[Asterisk-Users] mySQL-sipfriend dials to another SIP-endpoint - How to set the from-user
Hi, this seems to be a bug in chan_sip.c (asterisk-1.0.3). Whenever a column "restrictcid" is defined, the variable restrictcid was set to 1 in chan_sip. Now I changed line 1067 to u->restrictcid = *(rowval[x])-'0'; Now restrictcid really reads the value from the database. Thus setting this value in sipfriends to 0 lets this var to 0 => callerid is send to the remote sip end. Roger.