[OpenWrt-Devel] Subject: [PATCH] [package] Check port state on new call to avoid previous call ending

Jiri Slachta slachta at cesnet.cz
Mon Dec 15 20:06:07 EST 2014


Hello Roberto,

thank you for your contribution. You seem to have swapped the original and modified
source file while diffing it, but this is a not a big deal. I will test your change 
during this week and merge it if it works.

Next time please create pull request against the github telephony repository located
here https://github.com/openwrt/telephony

Thank you,
Jiri

Dne 16.12.2014 v 01:35 Roberto Ruiz napsal(a):
> From: Roberto Ruiz <robertoenlared at gmail.com <mailto:robertoenlared at gmail.com>>
> 
> When there is an Asterisk 1.8 VoIP conversation using a FXS port, and a second call is received, the first conversation turns imposible because the other person can´t hear you. The problem start when the Asterisk dialplan command "Dial(TAPI/1&TAPI/2,60)" is executed. It calls function "ast_lantiq_requester", defined on chan_lantiq.c, and this function creates a new channel without check if the port is in use. This patch modify the function to test if there is a call using the port and, if yes, a new channel won´t be created in that port.
> Signed-off-by: Roberto Ruiz <robertoenlared at gmail.com <mailto:robertoenlared at gmail.com>>
> ---
> --- trunk/feeds/telephony/net/asterisk-1.8.x/src-lantiq/channels/chan_lantiq.c.orig    2014-12-15 18:26:17.053726654 +0100
> +++ trunk/feeds/telephony/net/asterisk-1.8.x/src-lantiq/channels/chan_lantiq.c    2014-12-15 18:31:16.529050559 +0100
> @@ -758,16 +758,6 @@ static struct ast_channel * ast_lantiq_r
>       */
>      port_id -= 1;
>  
> -    /* check if port is in use */
> -    struct lantiq_pvt *pvt = &iflist[port_id];
> -    if (pvt->owner != NULL){
> -        ast_verbose(VERBOSE_PREFIX_3 "Request to create new channel on port_id %i, but port is in use. Channel not created.\n", port_id);
> -        ast_verbose(VERBOSE_PREFIX_3 "Port state:%s.\n", state_string(pvt->channel_state));
> -        *cause = AST_CAUSE_USER_BUSY;
> -        ast_mutex_unlock(&iflock);
> -        return NULL;
> -    }
> -
>      chan = lantiq_channel(AST_STATE_DOWN, port_id, NULL, NULL);
>  
>      ast_mutex_unlock(&iflock);
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list